bootstrap: Pass correct linker-flavor flag for wasm targets#139375
bootstrap: Pass correct linker-flavor flag for wasm targets#13937512101111 wants to merge 1 commit intorust-lang:masterfrom
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.
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.
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