pass optimization level to llvm-bitcode-linker

This commit is contained in:
usamoi 2025-02-05 20:09:50 +08:00
parent a18bd8acfc
commit 123062bfd9

View file

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