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

Fix wasm32-unknown-unknown by passing -c #1424

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

Conversation

NobodyXu
Copy link
Collaborator

Fix #1423

@NobodyXu NobodyXu requested a review from madsmtm February 27, 2025 13:37
@NobodyXu NobodyXu enabled auto-merge (squash) February 27, 2025 13:38
@NobodyXu NobodyXu disabled auto-merge February 27, 2025 13:38
@NobodyXu
Copy link
Collaborator Author

I don't know why it's removed, cc @madsmtm do you remember why?

@madsmtm
Copy link
Collaborator

madsmtm commented Feb 28, 2025

Traced this back to #1322.

@madsmtm
Copy link
Collaborator

madsmtm commented Feb 28, 2025

Perhaps we need to add an (internal) flag needs_linker to is_flag_supported? And set it to true for -fembed-bitcode=... (and maybe others)?

I generally agree that we should not attempt to link if we can avoid it, so we really should pass -c unless absolutely necessary that we don't.

@madsmtm
Copy link
Collaborator

madsmtm commented Feb 28, 2025

Hmm, actually, I think #1322 is wrong, and the real solution was #1379.

CC @clubby789, can you check if this PR still works for you?

@madsmtm madsmtm added the bug label Feb 28, 2025
Co-authored-by: Mads Marquart <[email protected]>
@clubby789
Copy link
Contributor

Hmm, actually, I think 1322 is wrong, and the real solution was 1379.

CC @clubby789, can you check if this PR still works for you?

1379 does indeed fix the specific case, but 1322 is about preventing the general case (of linker-specific flags being incorrectly reported as supported). The needs_linker idea sounds like a sensible fix to me

@madsmtm
Copy link
Collaborator

madsmtm commented Mar 1, 2025

But cc generally doesn't link, and thus we shouldn't be passing flags that affect the linker in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

is_flag_supported returns false negatives
3 participants