-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Update linux_musl base to dynamically link the crt by default #133386
Update linux_musl base to dynamically link the crt by default #133386
Conversation
However, don't change the behavior of any existing targets at this time. For targets that used the old default, explicitly set `crt_static_default = true`. This makes it easier for new targets to use the correct defaults while leaving the changing of individual targets to future PRs. Related to rust-lang/compiler-team#422
These commits modify compiler targets. |
// These targets statically link libc by default | ||
base.crt_static_default = true; | ||
|
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.
Question: do we have any way to test (or rather, track) the "finalized" crt static default for each target (as in, after the base and overrides are merged together to produce the final value for a given target)? So that if anyone does modify the default and cause the "finalized" value to change, we do so intentionally with something like a test rebless or test modification?
I looked at --print=all-target-specs-json
locally, but AFAICT that omits this field if it's not overriden or something...
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.
Yeah, I added a run-make test that captures the current state.
r? @jieyouxu |
This PR modifies cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
263e6e1
to
3f3ee2d
Compare
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.
Thanks!
@bors r+ rollup |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#133221 (Add external macros specific diagnostics for check-cfg) - rust-lang#133386 (Update linux_musl base to dynamically link the crt by default) - rust-lang#134191 (Make some types and methods related to Polonius + Miri public) - rust-lang#134227 (Update wasi-sdk used to build WASI targets) - rust-lang#134279 ((Re-)return adjustment target if adjust kind is never-to-any) - rust-lang#134295 (Encode coroutine-closures in SMIR) r? `@ghost` `@rustbot` modify labels: rollup
// If the value is `null`, then the default to dynamically link from | ||
// musl_base was not overriden. | ||
if default.is_null() { | ||
continue; |
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.
Maybe also check that LEGACY_STATIC_LINKING_TARGETS
does not contain the target?
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#133221 (Add external macros specific diagnostics for check-cfg) - rust-lang#133386 (Update linux_musl base to dynamically link the crt by default) - rust-lang#134191 (Make some types and methods related to Polonius + Miri public) - rust-lang#134227 (Update wasi-sdk used to build WASI targets) - rust-lang#134279 ((Re-)return adjustment target if adjust kind is never-to-any) - rust-lang#134295 (Encode coroutine-closures in SMIR) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133386 - wesleywiser:update_musl_base_crt_default, r=jieyouxu Update linux_musl base to dynamically link the crt by default However, don't change the behavior of any existing targets at this time. For targets that used the old default, explicitly set `crt_static_default = true`. This makes it easier for new targets to use the correct defaults while leaving the changing of individual targets to future PRs. Related to rust-lang/compiler-team#422
However, don't change the behavior of any existing targets at this time. For targets that used the old default, explicitly set
crt_static_default = true
.This makes it easier for new targets to use the correct defaults while leaving the changing of individual targets to future PRs.
Related to rust-lang/compiler-team#422