diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index af53b35d815..ace8e0516ed 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -123,7 +123,7 @@ unsafe fn configure_llvm(sess: &Session) { sess.opts.debugging_opts.new_llvm_pass_manager.unwrap_or(false); // Use the legacy pm registration if the new_llvm_pass_manager option isn't explicitly enabled - if use_new_llvm_pm_plugin_register { + if !use_new_llvm_pm_plugin_register { // Register LLVM plugins by loading them into the compiler process. for plugin in &sess.opts.debugging_opts.llvm_plugins { let lib = Library::new(plugin).unwrap_or_else(|e| bug!("couldn't load plugin: {}", e)); diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index 0281fd929c5..d23fe621539 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -261,7 +261,11 @@ impl ModuleConfig { inline_threshold: sess.opts.cg.inline_threshold, new_llvm_pass_manager: sess.opts.debugging_opts.new_llvm_pass_manager, emit_lifetime_markers: sess.emit_lifetime_markers(), - llvm_plugins: if_regular!(sess.opts.debugging_opts.llvm_plugins.clone(), vec![]), + llvm_plugins: if sess.opts.debugging_opts.new_llvm_pass_manager.unwrap_or(false) { + if_regular!(sess.opts.debugging_opts.llvm_plugins.clone(), vec![]) + } else { + vec![] + }, } } |
