Also enable Cranelift optimizations with -Copt-level=1/2

This commit is contained in:
bjorn3 2024-10-03 12:36:16 +00:00
parent 0f1284cea7
commit 0ba084514a

View File

@ -298,8 +298,11 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Arc<dyn TargetIs
OptLevel::No => {
flags_builder.set("opt_level", "none").unwrap();
}
OptLevel::Less | OptLevel::Default => {}
OptLevel::Size | OptLevel::SizeMin | OptLevel::Aggressive => {
OptLevel::Less
| OptLevel::Default
| OptLevel::Size
| OptLevel::SizeMin
| OptLevel::Aggressive => {
flags_builder.set("opt_level", "speed_and_size").unwrap();
}
}