diff --git a/src/librustc_codegen_llvm/back/linker.rs b/src/librustc_codegen_llvm/back/linker.rs index ef98fae9cc7ee..6311ab7c74c1c 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) {