]> git.lizzy.rs Git - rust.git/commitdiff
Enable fatal warnings for the wasm32 linker
authorAlex Crichton <alex@alexcrichton.com>
Sat, 15 Sep 2018 16:15:48 +0000 (09:15 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 15 Sep 2018 16:15:48 +0000 (09:15 -0700)
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.

src/librustc_codegen_llvm/back/linker.rs

index 95be2d82123a7c619be090ffabb789dbc4973235..c03180c02fe634f5d1c6b5c62a304cd2eb40fcb4 100644 (file)
@@ -1071,6 +1071,10 @@ fn finalize(&mut self) -> Command {
         // 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