diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-23 13:41:18 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-23 13:41:18 +0000 |
commit | 0ab9fa85e79717636de0e83bd36218cfc33f7ad6 (patch) | |
tree | 61aeeab0ac657908c1e67eef1190148ea61ad4c6 /lib | |
parent | b2211c1b1efbc1474c0f512fe385e121e452238c (diff) | |
download | external_llvm-0ab9fa85e79717636de0e83bd36218cfc33f7ad6.zip external_llvm-0ab9fa85e79717636de0e83bd36218cfc33f7ad6.tar.gz external_llvm-0ab9fa85e79717636de0e83bd36218cfc33f7ad6.tar.bz2 |
Hack out the PIC mode on Win64 targets. This needs to be investigated later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86TargetMachine.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 2d0424b..98d1fb4 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -119,8 +119,10 @@ X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS, Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4), InstrInfo(*this), JITInfo(*this), TLInfo(*this) { DefRelocModel = getRelocationModel(); + // FIXME: Correctly select PIC model for Win64 stuff if (getRelocationModel() == Reloc::Default) { - if (Subtarget.isTargetDarwin() || Subtarget.isTargetCygMing()) + if (Subtarget.isTargetDarwin() || + (Subtarget.isTargetCygMing() && !Subtarget.isTargetWin64())) setRelocationModel(Reloc::DynamicNoPIC); else setRelocationModel(Reloc::Static); |