File tree 2 files changed +6
-2
lines changed
rustc_codegen_ssa/src/back
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ unsafe fn configure_llvm(sess: &Session) {
123
123
sess. opts . debugging_opts . new_llvm_pass_manager . unwrap_or ( false ) ;
124
124
125
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 {
126
+ if ! use_new_llvm_pm_plugin_register {
127
127
// Register LLVM plugins by loading them into the compiler process.
128
128
for plugin in & sess. opts . debugging_opts . llvm_plugins {
129
129
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,7 +261,11 @@ impl ModuleConfig {
261
261
inline_threshold : sess. opts . cg . inline_threshold ,
262
262
new_llvm_pass_manager : sess. opts . debugging_opts . new_llvm_pass_manager ,
263
263
emit_lifetime_markers : sess. emit_lifetime_markers ( ) ,
264
- llvm_plugins : if_regular ! ( sess. opts. debugging_opts. llvm_plugins. clone( ) , vec![ ] ) ,
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
+ } ,
265
269
}
266
270
}
267
271
You can’t perform that action at this time.
0 commit comments