Description
rustc is now passing the argument --fatal-warnings
to lld on wasm32 (wasm-ld). This appears to have been added in #54258
While I agree with the sentiment in the comment "Rust code should never have warnings, and warnings are often indicative of bugs, let's prevent them", unfortunately the same cannot apparently be said of C++ code.
I am currently getting bitten by "harmless" warnings due to a bug in LLVM: https://bugs.llvm.org/show_bug.cgi?id=40412
Unfortunately, because rustc is passing --fatal-warnings
to wasm-ld, these warnings are not harmless to me but rather prevent me from linking the C++ library into my rust project.
I looked for an override such as --no-fatal-warnings
but there does not appear to be one. Could we perhaps add an option to rustc such that the --fatal-warnings
option can be suppressed (maybe via RUSTFLAGS) in cases where for whatever reason we run into otherwise harmless LLVM warnings?