diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-06-28 17:56:43 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-06-28 17:56:43 +0000 |
commit | fece4a86326cbb72d30cb701c98123f348cd0692 (patch) | |
tree | 528b1c85f0b307cb0fc46722c322c0af602f1910 /llvm/lib/Target/X86/X86TargetMachine.cpp | |
parent | 0bab83e43e531baf80c6930b86e742baf3b2a30a (diff) |
Revert "Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code models""
Reverting because this is causing failures in the LLDB test suite on
GreenDragon.
LLVM ERROR: unsupported relocation with subtraction expression, symbol
'__GLOBAL_OFFSET_TABLE_' can not be undefined in a subtraction
expression
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp index c5f476b54b9..5de3b8a992e 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.cpp +++ b/llvm/lib/Target/X86/X86TargetMachine.cpp @@ -156,15 +156,9 @@ static std::string computeDataLayout(const Triple &TT) { } static Reloc::Model getEffectiveRelocModel(const Triple &TT, - bool JIT, Optional<Reloc::Model> RM) { bool is64Bit = TT.getArch() == Triple::x86_64; if (!RM.hasValue()) { - // JIT codegen should use static relocations by default, since it's - // typically executed in process and not relocatable. - if (JIT) - return Reloc::Static; - // Darwin defaults to PIC in 64 bit mode and dynamic-no-pic in 32 bit mode. // Win64 requires rip-rel addressing, thus we force it to PIC. Otherwise we // use static relocation model by default. @@ -216,7 +210,7 @@ X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT, CodeGenOpt::Level OL, bool JIT) : LLVMTargetMachine( T, computeDataLayout(TT), TT, CPU, FS, Options, - getEffectiveRelocModel(TT, JIT, RM), + getEffectiveRelocModel(TT, RM), getEffectiveCodeModel(CM, JIT, TT.getArch() == Triple::x86_64), OL), TLOF(createTLOF(getTargetTriple())) { // Windows stack unwinder gets confused when execution flow "falls through" |