-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustc emits an unexpected _rdl symbols for WASM with lto=true #146235
Copy link
Copy link
Closed
Labels
A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Assignees
Labels
A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)C-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It seems that 7a01c7f introduced an issue with lto + WASM + global allocator
Details
rustc emits an unexpected
_rdlsymbol for WASM (no_std) withlto=true, which imports unavailable external functions:This behavior is not observed with
lto=falseOR the latest stable Rust (1.89)Cargo.toml
lib.rs
build with
cargo +nightly build --target=wasm32-unknown-unknown --release wasm-tools print target/wasm32-unknown-unknown/release/issue_wasm_lto.wasm > issue_wasm_lto.watVersion it worked on
rustc 1.91.0-nightly (c8ca44c98 2025-08-10)Version with regression
rustc 1.91.0-nightly (af00ff2ce 2025-09-04)