Skip to content

Commit 4265256

Browse files
committed
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 #53390 sooner.
1 parent 052d24e commit 4265256

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)