Fix -Ctarget-features getting ignored after crt-static#144143
Merged
bors merged 2 commits intorust-lang:masterfrom Jul 20, 2025
Merged
Fix -Ctarget-features getting ignored after crt-static#144143bors merged 2 commits intorust-lang:masterfrom
-Ctarget-features getting ignored after crt-static#144143bors merged 2 commits intorust-lang:masterfrom
Conversation
The current behaviour introduced by commit a50a3b8 would discard any target features specified after crt-static (the only member of RUSTC_SPECIFIC_FEATURES). This is because it returned instead of continuing processing the next flag. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Collaborator
|
rustbot has assigned @compiler-errors. Use |
Collaborator
|
Some changes occurred in compiler/rustc_codegen_ssa |
-Ctarget-features getting ignored after crt-static-Ctarget-features getting ignored after crt-static
Contributor
Author
|
This should probably also be backported to 1.89. |
Contributor
|
Regression introduced in #140920 |
Contributor
|
Zulip discussion: #t-compiler/help > Lots of ABI/target-feature test fails |
Member
|
@Gelbpunkt can you open an issue for this? We usually don't require issues for bug fixes but we use them for tracking backports, so it would be useful here. |
Member
Collaborator
Contributor
Author
Opened #144203 |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Jul 20, 2025
…ic, r=RalfJung Fix `-Ctarget-feature`s getting ignored after `crt-static` The current behaviour introduced by commit a50a3b8 would discard any target features specified after `crt-static` (the only member of `RUSTC_SPECIFIC_FEATURES`). This is because it returned instead of continuing processing the next feature. I wasn't entirely sure how the regression test should look like, but this one should do. If anyone has some suggestions, I'm happy to learn, it's my first test :) I've confirmed that the test fails without the fix on `powerpc64le-unknown-linux-musl` and `x86_64-unknown-linux-gnu`. cc `@RalfJung`
This was referenced Jul 20, 2025
bors
added a commit
that referenced
this pull request
Jul 20, 2025
Rollup of 9 pull requests Successful merges: - #143282 (Add `uX::strict_sub_signed`) - #143423 (address clippy formatting nits) - #143720 (Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too) - #144011 (bootstrap: Don't trigger an unnecessary LLVM build from check builds) - #144112 (bootstrap: Ignore `rust.debuginfo-level-tests` for codegen tests) - #144125 (Add new `ignore-backends` and `needs-backends` tests annotations) - #144143 (Fix `-Ctarget-feature`s getting ignored after `crt-static`) - #144150 (tests: assembly: cstring-merging: Disable GlobalMerge pass) - #144190 (Give a message with a span on MIR validation error) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Jul 20, 2025
Rollup merge of #144143 - Gelbpunkt:target-features-crt-static, r=RalfJung Fix `-Ctarget-feature`s getting ignored after `crt-static` The current behaviour introduced by commit a50a3b8 would discard any target features specified after `crt-static` (the only member of `RUSTC_SPECIFIC_FEATURES`). This is because it returned instead of continuing processing the next feature. I wasn't entirely sure how the regression test should look like, but this one should do. If anyone has some suggestions, I'm happy to learn, it's my first test :) I've confirmed that the test fails without the fix on `powerpc64le-unknown-linux-musl` and `x86_64-unknown-linux-gnu`. cc ``@RalfJung``
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jul 21, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143282 (Add `uX::strict_sub_signed`) - rust-lang/rust#143423 (address clippy formatting nits) - rust-lang/rust#143720 (Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too) - rust-lang/rust#144011 (bootstrap: Don't trigger an unnecessary LLVM build from check builds) - rust-lang/rust#144112 (bootstrap: Ignore `rust.debuginfo-level-tests` for codegen tests) - rust-lang/rust#144125 (Add new `ignore-backends` and `needs-backends` tests annotations) - rust-lang/rust#144143 (Fix `-Ctarget-feature`s getting ignored after `crt-static`) - rust-lang/rust#144150 (tests: assembly: cstring-merging: Disable GlobalMerge pass) - rust-lang/rust#144190 (Give a message with a span on MIR validation error) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jul 21, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143282 (Add `uX::strict_sub_signed`) - rust-lang/rust#143423 (address clippy formatting nits) - rust-lang/rust#143720 (Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too) - rust-lang/rust#144011 (bootstrap: Don't trigger an unnecessary LLVM build from check builds) - rust-lang/rust#144112 (bootstrap: Ignore `rust.debuginfo-level-tests` for codegen tests) - rust-lang/rust#144125 (Add new `ignore-backends` and `needs-backends` tests annotations) - rust-lang/rust#144143 (Fix `-Ctarget-feature`s getting ignored after `crt-static`) - rust-lang/rust#144150 (tests: assembly: cstring-merging: Disable GlobalMerge pass) - rust-lang/rust#144190 (Give a message with a span on MIR validation error) r? `@ghost` `@rustbot` modify labels: rollup
Muscraft
pushed a commit
to Muscraft/rust
that referenced
this pull request
Jul 21, 2025
…ic, r=RalfJung Fix `-Ctarget-feature`s getting ignored after `crt-static` The current behaviour introduced by commit a50a3b8 would discard any target features specified after `crt-static` (the only member of `RUSTC_SPECIFIC_FEATURES`). This is because it returned instead of continuing processing the next feature. I wasn't entirely sure how the regression test should look like, but this one should do. If anyone has some suggestions, I'm happy to learn, it's my first test :) I've confirmed that the test fails without the fix on `powerpc64le-unknown-linux-musl` and `x86_64-unknown-linux-gnu`. cc ``@RalfJung``
Muscraft
pushed a commit
to Muscraft/rust
that referenced
this pull request
Jul 21, 2025
…llaumeGomez Rollup of 9 pull requests Successful merges: - rust-lang#143282 (Add `uX::strict_sub_signed`) - rust-lang#143423 (address clippy formatting nits) - rust-lang#143720 (Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too) - rust-lang#144011 (bootstrap: Don't trigger an unnecessary LLVM build from check builds) - rust-lang#144112 (bootstrap: Ignore `rust.debuginfo-level-tests` for codegen tests) - rust-lang#144125 (Add new `ignore-backends` and `needs-backends` tests annotations) - rust-lang#144143 (Fix `-Ctarget-feature`s getting ignored after `crt-static`) - rust-lang#144150 (tests: assembly: cstring-merging: Disable GlobalMerge pass) - rust-lang#144190 (Give a message with a span on MIR validation error) r? `@ghost` `@rustbot` modify labels: rollup
Contributor
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current behaviour introduced by commit a50a3b8 would discard any target features specified after
crt-static(the only member ofRUSTC_SPECIFIC_FEATURES). This is because it returned instead of continuing processing the next feature.I wasn't entirely sure how the regression test should look like, but this one should do. If anyone has some suggestions, I'm happy to learn, it's my first test :)
I've confirmed that the test fails without the fix on
powerpc64le-unknown-linux-muslandx86_64-unknown-linux-gnu.cc @RalfJung
fixes #144203