FrameInfo(TargetFrameInfo::StackGrowsDown,
Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4),
InstrInfo(*this), JITInfo(*this), TLInfo(*this) {
+ DefRelocModel = getRelocationModel();
if (getRelocationModel() == Reloc::Default)
if (Subtarget.isTargetDarwin() || Subtarget.isTargetCygMing())
setRelocationModel(Reloc::DynamicNoPIC);
bool X86TargetMachine::addCodeEmitter(FunctionPassManager &PM, bool Fast,
bool DumpAsm, MachineCodeEmitter &MCE) {
// FIXME: Move this to TargetJITInfo!
- setRelocationModel(Reloc::Static);
+ if (DefRelocModel == Reloc::Default)
+ setRelocationModel(Reloc::Static);
Subtarget.setPICStyle(PICStyle::None);
// JIT cannot ensure globals are placed in the lower 4G of address.