Skip to content

Commit

Permalink
Enable fatal warnings for the wasm32 linker
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Sep 15, 2018
1 parent 052d24e commit 4265256
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_codegen_llvm/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,10 @@ impl<'a> Linker for WasmLd<'a> {
// Make the default table accessible
self.cmd.arg("--export-table");

// Rust code should never have warnings, and warnings are often
// indicative of bugs, let's prevent them.
self.cmd.arg("--fatal-warnings");

let mut cmd = Command::new("");
::std::mem::swap(&mut cmd, &mut self.cmd);
cmd
Expand Down

0 comments on commit 4265256

Please sign in to comment.