mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 20:06:03 +03:00
Default to ld.gold on Linux in general, not just with -flto=thin
This commit is contained in:
parent
055fa1be8b
commit
b12f2eae8d
1 changed files with 4 additions and 2 deletions
|
@ -524,8 +524,10 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
|
|||
void ArgsBuilder::addLinker() {
|
||||
if (!opts::linker.empty()) {
|
||||
args.push_back("-fuse-ld=" + opts::linker);
|
||||
} else if (global.params.isLinux && opts::isUsingThinLTO()) {
|
||||
// default to ld.gold for ThinLTO on Linux due to ld.bfd issues (see #2278)
|
||||
} else if (global.params.isLinux) {
|
||||
// Default to ld.gold on Linux due to ld.bfd issues with ThinLTO (see #2278)
|
||||
// and older bfd versions stripping llvm.used symbols (e.g., ModuleInfo
|
||||
// refs) with --gc-sections (see #2870).
|
||||
args.push_back("-fuse-ld=gold");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue