-
Notifications
You must be signed in to change notification settings - Fork 339
Keep start and stop symbols linked through clang (Linux) #8214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -677,8 +677,17 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, | |
} | ||
|
||
Args.AddAllArgs(CmdArgs, options::OPT_T); | ||
bool useLLD = false; | ||
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath(&useLLD)); | ||
if (useLLD) { | ||
Comment on lines
+680
to
+682
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, mainly to support when someone isn't passing |
||
/// Workaround for https://reviews.llvm.org/D96914 breaking Swift. | ||
/// Newer LLD versions change symbols, resulting in incorrect locations | ||
/// for the type metadata tables. Forcing `-z nostart-stop-gc` on LLD so | ||
/// that it does not munge the symbols. | ||
CmdArgs.push_back("-z"); | ||
CmdArgs.push_back("nostart-stop-gc"); | ||
} | ||
|
||
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); | ||
C.addCommand(std::make_unique<Command>(JA, *this, | ||
ResponseFileSupport::AtFileCurCP(), | ||
Exec, CmdArgs, Inputs, Output)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unnecessary? Would be nice to stay as close to upstream as possible.