Skip to content

Commit f214666

Browse files
authored
Rollup merge of #53434 - alexcrichton:remove-strip-debug, r=yurydelendik
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.
2 parents 5c7b837 + ed39cc0 commit f214666

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/librustc_codegen_llvm/back/linker.rs

-12
Original file line numberDiff line numberDiff line change
@@ -1006,18 +1006,6 @@ impl<'a> Linker for WasmLd<'a> {
10061006
OptLevel::Size => "-O2",
10071007
OptLevel::SizeMin => "-O2"
10081008
});
1009-
match self.sess.opts.optimize {
1010-
OptLevel::No => (),
1011-
OptLevel::Less |
1012-
OptLevel::Default |
1013-
OptLevel::Aggressive |
1014-
OptLevel::Size |
1015-
OptLevel::SizeMin => {
1016-
// LLD generates incorrect debugging information when
1017-
// optimization is applied: strip debug sections.
1018-
self.cmd.arg("--strip-debug");
1019-
}
1020-
}
10211009
}
10221010

10231011
fn pgo_gen(&mut self) {

0 commit comments

Comments
 (0)