Skip to content

Commit 086688c

Browse files
committed
IRGen: Disable indirect symbol replacement with GOTPCREL for AArch64/ELF
The linkers in our Linux environments do not support this option and fail to link the standard library. See: - swiftlang/llvm-project#9339 - llvm/llvm-project#78003
1 parent 887cf06 commit 086688c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/IRGen/IRGen.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ swift::getIRTargetOptions(const IRGenOptions &Opts, ASTContext &Ctx) {
132132
// FIXME: We should do this entirely through Clang, for consistency.
133133
TargetOptions TargetOpts;
134134

135+
// Linker support for this is not widespread enough.
136+
TargetOpts.SupportIndirectSymViaGOTPCRel_AArch64_ELF = false;
137+
135138
// Explicitly request debugger tuning for LLDB which is the default
136139
// on Darwin platforms but not on others.
137140
TargetOpts.DebuggerTuning = llvm::DebuggerKind::LLDB;

0 commit comments

Comments
 (0)