Skip to content

Commit 13cea8e

Browse files
authored
Rollup merge of rust-lang#54258 - alexcrichton:lld-fatal-warnings, r=eddyb
Enable fatal warnings for the wasm32 linker Historically LLD has emitted warnings for various reasons but all the bugs have since been fixed (yay!) and by enabling fatal warnings we should be able to head off bugs like rust-lang#53390 sooner.
2 parents a135005 + 4265256 commit 13cea8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc_codegen_llvm/back/linker.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,10 @@ impl<'a> Linker for WasmLd<'a> {
10711071
// Make the default table accessible
10721072
self.cmd.arg("--export-table");
10731073

1074+
// Rust code should never have warnings, and warnings are often
1075+
// indicative of bugs, let's prevent them.
1076+
self.cmd.arg("--fatal-warnings");
1077+
10741078
let mut cmd = Command::new("");
10751079
::std::mem::swap(&mut cmd, &mut self.cmd);
10761080
cmd

0 commit comments

Comments
 (0)