-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Generalize configuring LLD as the default linker in bootstrap #147626
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
base: master
Are you sure you want to change the base?
Conversation
These commits modify compiler targets. This PR modifies If appropriate, please update This PR modifies If appropriate, please update |
@bors r=jieyouxu |
Generalize configuring LLD as the default linker in bootstrap Reopen of rust-lang#147157, because apparently bors can't deal with it for some reason. r? `@ghost`
Generalize configuring LLD as the default linker in bootstrap Reopen of rust-lang#147157, because apparently bors can't deal with it for some reason. r? ``@ghost``
I copy-pasted the description from the old PR, because that sort of thing tends to be handy when looking through history. |
The old PR was rollup=never; should this one be too? |
Bors still haven't updated the mergeability status even of this PR.. let's just try to roll it up and see what happens. It might be the only way to merge this, lol. |
Do we need to attempt a resync? |
It caught up to this PR now, so I don't think so. #147569 is the only approved one right now that doesn't have the mergeability status. |
Reopen of #147157, because apparently bors can't deal with it for some reason.
This PR generalizes the previous hardcoded logic for setting self-contained LLD to be used as the default Linker on Linux GNU targets. The changes made:
rust.lld
now only controls whether LLD is built and included in the sysroot. Ifrust.lld
is set tofalse
, it will disable the default opt into LLD on x64 Linux.rust-lld
throughcc
can now be applied to all Linux targets. It is configured throughtarget.<target>.default-linker-linux-override = "self-contained-lld-cc"/"off"
Here is how it behaves:
default-linker-linux-override = "self-contained-lld-cc"
and alsorust.lld = true
.rust.lld = false
, you disable this overridetarget.x86_64-unknown-linux-gnu.default-linux-linker-override = "off"
, you disable this overridetarget.x86_64-unknown-linux-gnu.llvm-config = ...
, you disable this overrideNote that in contrast to what I described in #146640, I didn't bother moving
rust.lld
tollvm.lld
. We can do that separately later, but I don't think it's worth the churn. I realized thatrust
is perhaps a better place for this, because it not only controls whether LLD is built, but also if it is included in the compiler sysroot. So to truly distinguish these two, we'd need bothllvm.lld
andrust.lld
, which doesn't seem worth it. Note thatrust.codegen-backends = ["llvm"]
works in the same way, it tells bootstrap to build LLVM and include it in the sysroot. So it is consistent withrust.lld
Related to: #146640
r? @ghost