File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
rustc_codegen_ssa/src/back Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ unsafe fn configure_llvm(sess: &Session) {
119119
120120 llvm:: LLVMInitializePasses ( ) ;
121121
122- let use_new_llvm_pm_plugin_register =
123- sess . opts . debugging_opts . new_llvm_pass_manager . unwrap_or ( false ) ;
124-
125- // Use the legacy pm registration if the new_llvm_pass_manager option isn't explicitly enabled
126- if !use_new_llvm_pm_plugin_register {
122+ // Use the legacy plugin registration if we don't use the new pass manager
123+ if ! should_use_new_llvm_pass_manager (
124+ & sess . opts . debugging_opts . new_llvm_pass_manager ,
125+ & sess . target . arch ,
126+ ) {
127127 // Register LLVM plugins by loading them into the compiler process.
128128 for plugin in & sess. opts . debugging_opts . llvm_plugins {
129129 let lib = Library :: new ( plugin) . unwrap_or_else ( |e| bug ! ( "couldn't load plugin: {}" , e) ) ;
Original file line number Diff line number Diff line change @@ -261,11 +261,7 @@ impl ModuleConfig {
261261 inline_threshold : sess. opts . cg . inline_threshold ,
262262 new_llvm_pass_manager : sess. opts . debugging_opts . new_llvm_pass_manager ,
263263 emit_lifetime_markers : sess. emit_lifetime_markers ( ) ,
264- llvm_plugins : if sess. opts . debugging_opts . new_llvm_pass_manager . unwrap_or ( false ) {
265- if_regular ! ( sess. opts. debugging_opts. llvm_plugins. clone( ) , vec![ ] )
266- } else {
267- vec ! [ ]
268- } ,
264+ llvm_plugins : if_regular ! ( sess. opts. debugging_opts. llvm_plugins. clone( ) , vec![ ] ) ,
269265 }
270266 }
271267
You can’t perform that action at this time.
0 commit comments