about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2023-07-29 17:29:54 +0200
committerJakub Beránek <berykubik@gmail.com>2023-07-31 08:54:47 +0200
commit142995f15f3d843f7453d2cd875eab4aababd410 (patch)
tree7dbd70b1f72afd6e9636eb6f330e700671c975a4 /src/bootstrap
parent78403f4e1381ff227e0438240e2534c8ea7009fb (diff)
Pass BOLT profile to bootstrap to be included in the reproducible artifacts archive
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/config.rs6
-rw-r--r--src/bootstrap/dist.rs4
-rw-r--r--src/bootstrap/flags.rs7
3 files changed, 8 insertions, 9 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 56e667d4d12..45bea9608fc 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -232,8 +232,8 @@ pub struct Config {
     pub llvm_profile_use: Option<String>,
     pub llvm_profile_generate: bool,
     pub llvm_libunwind_default: Option<LlvmLibunwind>,
-    pub llvm_bolt_profile_generate: bool,
-    pub llvm_bolt_profile_use: Option<String>,
+
+    pub reproducible_artifacts: Vec<String>,
 
     pub build: TargetSelection,
     pub hosts: Vec<TargetSelection>,
@@ -1462,6 +1462,8 @@ impl Config {
             config.rust_profile_generate = flags.rust_profile_generate;
         }
 
+        config.reproducible_artifacts = flags.reproducible_artifact;
+
         // rust_info must be set before is_ci_llvm_available() is called.
         let default = config.channel == "dev";
         config.omit_git_hash = omit_git_hash.unwrap_or(default);
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 16d25b9b814..32da4ac29a4 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -2265,8 +2265,8 @@ impl Step for ReproducibleArtifacts {
             tarball.add_file(path, ".", 0o644);
             added_anything = true;
         }
-        if let Some(path) = builder.config.llvm_bolt_profile_use.as_ref() {
-            tarball.add_file(path, ".", 0o644);
+        for profile in &builder.config.reproducible_artifacts {
+            tarball.add_file(profile, ".", 0o644);
             added_anything = true;
         }
         if added_anything { Some(tarball.generate()) } else { None }
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
index 96c9daf2c2c..a1e0a440729 100644
--- a/src/bootstrap/flags.rs
+++ b/src/bootstrap/flags.rs
@@ -149,12 +149,9 @@ pub struct Flags {
     /// generate PGO profile with llvm built for rustc
     #[arg(global(true), long)]
     pub llvm_profile_generate: bool,
-    /// generate BOLT profile for LLVM build
+    /// Additional reproducible artifacts that should be added to the reproducible artifacts archive.
     #[arg(global(true), long)]
-    pub llvm_bolt_profile_generate: bool,
-    /// use BOLT profile for LLVM build
-    #[arg(global(true), value_hint = clap::ValueHint::FilePath, long, value_name = "PROFILE")]
-    pub llvm_bolt_profile_use: Option<String>,
+    pub reproducible_artifact: Vec<String>,
     #[arg(global(true))]
     /// paths for the subcommand
     pub paths: Vec<PathBuf>,