Skip to content

Fix -Ctarget-features getting ignored after crt-static #144143

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Gelbpunkt
Copy link
Contributor

@Gelbpunkt Gelbpunkt commented Jul 18, 2025

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

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 <[email protected]>
@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

r? @compiler-errors

rustbot has assigned @compiler-errors.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 18, 2025
@Gelbpunkt Gelbpunkt changed the title Fix -Ctarget-features getting ignored after crt-static Fix -Ctarget-features getting ignored after crt-static Jul 18, 2025
@Gelbpunkt
Copy link
Contributor Author

This should probably also be backported to 1.89.

@workingjubilee workingjubilee added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 18, 2025
@apiraino
Copy link
Contributor

apiraino commented Jul 18, 2025

Regression introduced in #140920

@tgross35
Copy link
Contributor

@Noratrieb
Copy link
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.

@RalfJung
Copy link
Member

It's a bit odd to make this a fail-test that way, but sure, why not. :) Thanks for finding the issue and fixing it!

r? @RalfJung
@bors r+

@bors
Copy link
Collaborator

bors commented Jul 19, 2025

📌 Commit 1b35d5f has been approved by RalfJung

It is now in the queue for this repository.

@rustbot rustbot assigned RalfJung and unassigned compiler-errors Jul 19, 2025
@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 Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. 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.

9 participants