diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-09-15 09:15:48 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-09-15 09:15:48 -0700 |
| commit | 42652565ee7da4053b24ec8cd1e31c0c30ac8174 (patch) | |
| tree | 0b2624dfafda25cf5a6b149343ceec3890937680 | |
| parent | 052d24e6c827577dadac28fb2b782dbe5445eab7 (diff) | |
| download | rust-42652565ee7da4053b24ec8cd1e31c0c30ac8174.tar.gz rust-42652565ee7da4053b24ec8cd1e31c0c30ac8174.zip | |
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.
| -rw-r--r-- | src/librustc_codegen_llvm/back/linker.rs | 4 |
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 |
