about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-09-20 21:36:22 +0800
committerGitHub <noreply@github.com>2018-09-20 21:36:22 +0800
commit13cea8e05ddca120ec7c733490f46a471ed11570 (patch)
tree2b3a1428eeb3f5aa953c9fba196032c3da8745e3 /src
parenta135005150fad21ddde16446a7dea08257102b84 (diff)
parent42652565ee7da4053b24ec8cd1e31c0c30ac8174 (diff)
Rollup merge of #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 #53390 sooner.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_codegen_llvm/back/linker.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/back/linker.rs b/src/librustc_codegen_llvm/back/linker.rs
index 95be2d82123..c03180c02fe 100644
--- a/src/librustc_codegen_llvm/back/linker.rs
+++ b/src/librustc_codegen_llvm/back/linker.rs
@@ -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