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
This commit is contained in:
Anton Korobeynikov 2008-03-23 13:41:18 +00:00
parent fd9d976d74
commit c15b81ba17

View File

@ -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);