1
Fork 0

Rollup merge of #136576 - usamoi:pass-more-llbc, r=fmease

pass optimization level to llvm-bitcode-linker

optimization level is not passed to llbc, which should be a mistake
This commit is contained in:
León Orell Valerian Liehr 2025-02-26 04:15:01 +01:00 committed by GitHub
commit 1cdd38666b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1939,14 +1939,14 @@ impl<'a> Linker for LlbcLinker<'a> {
} }
fn optimize(&mut self) { fn optimize(&mut self) {
match self.sess.opts.optimize { self.link_arg(match self.sess.opts.optimize {
OptLevel::No => "-O0", OptLevel::No => "-O0",
OptLevel::Less => "-O1", OptLevel::Less => "-O1",
OptLevel::More => "-O2", OptLevel::More => "-O2",
OptLevel::Aggressive => "-O3", OptLevel::Aggressive => "-O3",
OptLevel::Size => "-Os", OptLevel::Size => "-Os",
OptLevel::SizeMin => "-Oz", OptLevel::SizeMin => "-Oz",
}; });
} }
fn full_relro(&mut self) {} fn full_relro(&mut self) {}