about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-08-16 10:17:06 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-08-16 10:17:06 -0700
commited39cc074aa5d25ec8d7fc2e17b69bf97c148cda (patch)
tree52932f34ee6d047db192578854e902f295a269ef /src
parentd767ee11616390d128853a06f5addb619e79213f (diff)
downloadrust-ed39cc074aa5d25ec8d7fc2e17b69bf97c148cda.tar.gz
rust-ed39cc074aa5d25ec8d7fc2e17b69bf97c148cda.zip
wasm: Remove --strip-debug argument to LLD
Originally added in #52887 this commit disables passing `--strip-debug` to LLD
when optimized. This bring back the original bug of emitting broken debuginfo
but currently it *also* strips the `name` section which makes it very difficult
to inspect the final binary. A real fix is happening at
https://reviews.llvm.org/D50729 and we can reevaluate once we've updated LLD to
have that commit.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_codegen_llvm/back/linker.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/librustc_codegen_llvm/back/linker.rs b/src/librustc_codegen_llvm/back/linker.rs
index ef98fae9cc7..6311ab7c74c 100644
--- a/src/librustc_codegen_llvm/back/linker.rs
+++ b/src/librustc_codegen_llvm/back/linker.rs
@@ -1006,18 +1006,6 @@ impl<'a> Linker for WasmLd<'a> {
             OptLevel::Size => "-O2",
             OptLevel::SizeMin => "-O2"
         });
-        match self.sess.opts.optimize {
-            OptLevel::No => (),
-            OptLevel::Less |
-            OptLevel::Default |
-            OptLevel::Aggressive |
-            OptLevel::Size |
-            OptLevel::SizeMin => {
-                // LLD generates incorrect debugging information when
-                // optimization is applied: strip debug sections.
-                self.cmd.arg("--strip-debug");
-            }
-        }
     }
 
     fn pgo_gen(&mut self) {