Skip to content

Commit

Permalink
Rollup merge of #53434 - alexcrichton:remove-strip-debug, r=yurydelendik
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
frewsxcv authored Aug 17, 2018
2 parents 5c7b837 + ed39cc0 commit f214666
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/librustc_codegen_llvm/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f214666

Please sign in to comment.