aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-23 13:41:18 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-23 13:41:18 +0000
commit0ab9fa85e79717636de0e83bd36218cfc33f7ad6 (patch)
tree61aeeab0ac657908c1e67eef1190148ea61ad4c6 /lib
parentb2211c1b1efbc1474c0f512fe385e121e452238c (diff)
downloadexternal_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.cpp4
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);