Open ehuss opened 1 year ago
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-high
After PR #109806 lands, we should keep this open and tag it as E-needs-test, to try to catch regressions while this linker bug persists (assuming our CI covers this case...)
I don't think that issue is fixed, it has been worked around in std but there are libs which also want to inline funcions using statics like here https://github.com/tokio-rs/tracing/blob/bac25085fcea68ca30b8e19b8981fbd689f53735/tracing-core/src/dispatch.rs#L503 causing issues in downstream crates: https://github.com/astral-sh/ruff/issues/9245
Still here? Looks similar https://github.com/rust-lang/rust/pull/120679#issuecomment-1927792692 when bumping memchr to 2.6.0
WG-prioritization assigning again priority label, seems the workaround in #109806 had limited effect.
@rustbot label -E-needs-test +P-high
As I described in my previous comment the workaround only affects std library. Any downstream crate trying to perform the same optimisation will hit the same problem.
Since this issue is linked in various places, let's at least put the workaround in a visible spot (the bottom of the issue is not ideal but better than searching linked issues):
Use LLD (RUSTFLAGS=-Clink-arg=-fuse-ld=lld
assuming you have it in PATH), or use fat LTO, or disable LTO.
I tried this code:
on nightly-x86_64-pc-windows-gnu build with:
fails with the following:
This was discovered in Cargo's testsuite.
Bisected this to #108089. cc @Zoxc @bjorn3
Workaround
Use LLD (
RUSTFLAGS=-Clink-arg=-fuse-ld=lld
assuming you have it in PATH), or use fat LTO, or disable LTO.Meta
rustc --version --verbose
: