Skip to content

Commit

Permalink
Rollup merge of rust-lang#54258 - alexcrichton:lld-fatal-warnings, r=…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
kennytm authored Sep 20, 2018
2 parents a135005 + 4265256 commit 13cea8e
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 13cea8e

Please sign in to comment.