-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
bootstrap: do not invoke global lld
binary
#116197
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
I'm sufficiently sure that it's not the |
So yeah, global lld is indeed used - #116182 (comment). |
Hmm, this complicates things. I don't really like that bootstrap somewhat arbitrarily uses an externally provided
and when it also uses (or at least tries to use) the snapshot compiler's Assuming that there even is a practical way of passing absolute linker paths to all the tools that bootstrap configures with |
Sure, as I said in #116182 (comment) that would even be more convenient. |
So I looked a bit more into this and it seems to me that bootstrap is reimplementing a lot of what rustc already does, in regard to choosing the linker flavor and "self-containedness" of the linker. I wonder, what if we could remove some/most of this stuff from bootstrap, and just directly use the One thing I'm not sure about though is why does bootstrap combine the usage of |
That's not surprising, the compiler logic was only implemented recently, and the bootstrap logic is much older. |
Not sure, what is the alternative? |
Closing in favour of #116278. |
#102101 has introduced a check for passing some thread flags to
lld
. However, it was invoking a (globally available) binary calledlld
, which I'm pretty sure we never want to do in bootstrap. If you enableuse-lld
and don't have alld
binary available, this will crash the build.This PR fixes that by invoking the
lld
coming from the snapshot compiler instead.