[llvm-commits] [llvm] r45304 - /llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Evan Cheng
evan.cheng at apple.com
Fri Dec 21 17:12:14 PST 2007
Author: evancheng
Date: Fri Dec 21 19:12:14 2007
New Revision: 45304
URL: http://llvm.org/viewvc/llvm-project?rev=45304&view=rev
Log:
Allow JIT with non-static relocation model.
Modified:
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=45304&r1=45303&r2=45304&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Fri Dec 21 19:12:14 2007
@@ -170,7 +170,8 @@
bool X86TargetMachine::addCodeEmitter(FunctionPassManager &PM, bool Fast,
bool DumpAsm, MachineCodeEmitter &MCE) {
// FIXME: Move this to TargetJITInfo!
- setRelocationModel(Reloc::Static);
+ if (getRelocationModel() == Reloc::Default)
+ setRelocationModel(Reloc::Static);
Subtarget.setPICStyle(PICStyle::None);
// JIT cannot ensure globals are placed in the lower 4G of address.
More information about the llvm-commits
mailing list