Skip to content
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

Merged
merged 2 commits into from
Dec 14, 2024

Conversation

wesleywiser
Copy link
Member

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
@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 23, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

Comment on lines -11 to -13
// These targets statically link libc by default
base.crt_static_default = true;

Copy link
Member

@jieyouxu jieyouxu Nov 23, 2024

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...

Copy link
Member Author

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.

@BoxyUwU
Copy link
Member

BoxyUwU commented Nov 23, 2024

r? @jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned BoxyUwU Nov 23, 2024
@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2024
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Dec 11, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 11, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@wesleywiser wesleywiser force-pushed the update_musl_base_crt_default branch from 263e6e1 to 3f3ee2d Compare December 11, 2024 02:38
@tranquillity-codes tranquillity-codes added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 11, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 14, 2024

📌 Commit 3f3ee2d has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2024
…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;
Copy link
Member

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?

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2024
…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
@bors bors merged commit 1c24da6 into rust-lang:master Dec 14, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants