Make -Cpasses= only apply to pre-link optimization
This change causes passes specified in -Cpasses= to be applied only during pre-link optimization, not during LTO. This avoids such passes running multiple times, which they may not be designed for. Fixes https://github.com/rust-lang/rust/issues/97713
This commit is contained in:
parent
ec55c61305
commit
6738434de3
@ -467,7 +467,7 @@ pub(crate) unsafe fn optimize_with_new_llvm_pass_manager(
|
||||
let llvm_selfprofiler =
|
||||
llvm_profiler.as_mut().map(|s| s as *mut _ as *mut c_void).unwrap_or(std::ptr::null_mut());
|
||||
|
||||
let extra_passes = config.passes.join(",");
|
||||
let extra_passes = if !is_lto { config.passes.join(",") } else { "".to_string() };
|
||||
|
||||
let llvm_plugins = config.llvm_plugins.join(",");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user