about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorAxel Cohen <axel.cohen@eshard.com>2021-11-24 11:43:40 +0100
committerAxel Cohen <axel.cohen@eshard.com>2021-12-13 10:41:43 +0100
commitc4f29fa0ed738b52e7d8ef372c2d09300755dfef (patch)
tree70209b622c152b56c44064255abe29d85a46c2cd /compiler/rustc_codegen_ssa/src
parent97cf461b8f4c0ed0de8fdc1c441b904ddb8b3194 (diff)
downloadrust-c4f29fa0ed738b52e7d8ef372c2d09300755dfef.tar.gz
rust-c4f29fa0ed738b52e7d8ef372c2d09300755dfef.zip
Use the existing llvm-plugins option for both legacy and new pm registration
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/write.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs
index 65a13282224..0281fd929c5 100644
--- a/compiler/rustc_codegen_ssa/src/back/write.rs
+++ b/compiler/rustc_codegen_ssa/src/back/write.rs
@@ -74,8 +74,6 @@ pub enum BitcodeSection {
 pub struct ModuleConfig {
     /// Names of additional optimization passes to run.
     pub passes: Vec<String>,
-    /// Paths of LLVM pass plugins to load.
-    pub pass_plugins: Vec<String>,
     /// Some(level) to optimize at a certain level, or None to run
     /// absolutely no optimizations (used for the metadata module).
     pub opt_level: Option<config::OptLevel>,
@@ -115,6 +113,7 @@ pub struct ModuleConfig {
     pub inline_threshold: Option<u32>,
     pub new_llvm_pass_manager: Option<bool>,
     pub emit_lifetime_markers: bool,
+    pub llvm_plugins: Vec<String>,
 }
 
 impl ModuleConfig {
@@ -172,8 +171,6 @@ impl ModuleConfig {
         ModuleConfig {
             passes: if_regular!(sess.opts.cg.passes.clone(), vec![]),
 
-            pass_plugins: if_regular!(sess.opts.cg.pass_plugins.clone(), vec![]),
-
             opt_level: opt_level_and_size,
             opt_size: opt_level_and_size,
 
@@ -264,6 +261,7 @@ 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![]),
         }
     }