We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54628c8 commit e9509d7Copy full SHA for e9509d7
src/librustc_codegen_llvm/back/linker.rs
@@ -1006,6 +1006,18 @@ impl<'a> Linker for WasmLd<'a> {
1006
OptLevel::Size => "-O2",
1007
OptLevel::SizeMin => "-O2"
1008
});
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
1021
}
1022
1023
fn pgo_gen(&mut self) {
0 commit comments