summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-03 19:41:54 +0100
committerGitHub <noreply@github.com>2019-12-03 19:41:54 +0100
commit69f1323167c71b79561fb4ac297de2fbd75eb017 (patch)
treedeaee689e9906a46e405b8da2d3e58184183b9c0 /src/rustllvm/PassWrapper.cpp
parent71d1286bdf5cc094532a6263ad4cfaad5c54d097 (diff)
parent54b206034fe50b2234ab8ddb15214f723fe8d951 (diff)
downloadrust-69f1323167c71b79561fb4ac297de2fbd75eb017.tar.gz
rust-69f1323167c71b79561fb4ac297de2fbd75eb017.zip
Rollup merge of #66957 - parthsane:pvs/ftx_lld_linker, r=alexcrichton
Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld

Changed linker for `x86_64-fortanix-unknown-sgx` target to `rust-lld`
This change needed the RelaxELFRelocations flag to be set for it to work correctly

r? @jethrogb
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
-rw-r--r--src/rustllvm/PassWrapper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index a116ed282ac..b7f8e835909 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -393,7 +393,8 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
     bool TrapUnreachable,
     bool Singlethread,
     bool AsmComments,
-    bool EmitStackSizeSection) {
+    bool EmitStackSizeSection,
+    bool RelaxELFRelocations) {
 
   auto OptLevel = fromRust(RustOptLevel);
   auto RM = fromRust(RustReloc);
@@ -418,6 +419,7 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
   Options.MCOptions.AsmVerbose = AsmComments;
   Options.MCOptions.PreserveAsmComments = AsmComments;
   Options.MCOptions.ABIName = ABIStr;
+  Options.RelaxELFRelocations = RelaxELFRelocations;
 
   if (TrapUnreachable) {
     // Tell LLVM to codegen `unreachable` into an explicit trap instruction.