Skip to content

Commit 9c31066

Browse files
committed
Enable ELF relaxation
1 parent 7ce359a commit 9c31066

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rustllvm/PassWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
374374

375375
Options.EmitStackSizeSection = EmitStackSizeSection;
376376

377+
// Needed to work around bug in ld.bfd:
378+
// https://sourceware.org/bugzilla/show_bug.cgi?id=24784.
379+
Options.RelaxELFRelocations = true;
380+
377381
Optional<CodeModel::Model> CM;
378382
if (RustCM != LLVMRustCodeModel::None)
379383
CM = fromRust(RustCM);

0 commit comments

Comments
 (0)