-
Notifications
You must be signed in to change notification settings - Fork 13.3k
bootstrap: Pass correct linker-flavor flag for wasm targets #139375
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
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
src/bootstrap/src/utils/helpers.rs
Outdated
args.push("-Clinker-flavor=em-cc".to_string()); | ||
} else { | ||
args.push("-Clinker-flavor=wasm-lld-cc".to_string()); | ||
} |
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.
Alternatively you could omit the -Clinker-flavor
arg entirely on wasm given that wasm already uses lld by default (there is no other wasm linker that I know of).
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.
We should use -Zlinker-features
instead of the flavor, I messed this up. I fixed it in #139378.
LinkerFlavor::WasmLld is the only supported link flavor for wasm.
2106434
to
ee901f3
Compare
To provide a bit more context; I would really like to avoid hardcoding any flavors in bootstrap, that's fragile and flavors might be removed in the future anyway. With Thank you for looking into this though, and for reporting the issue! |
Rollup merge of rust-lang#139378 - Kobzol:bootstrap-use-lld-fix, r=petrochenkov Use target-agnostic LLD flags in bootstrap for `use-lld` [Before](rust-lang#135001), I hardcoded LLD flags that pretty much only worked on GNU. The right way is to use `-Zlinker-features` instead though. I *think* that this should also make this work on Windows mingw, and thus `@petrochenkov's` workaround is no longer necessary. Fixes: rust-lang#139372 Closes: rust-lang#139375 r? `@lqd`
Fix: #139372