Skip to content

Commit 8387315

Browse files
committed
Auto merge of #125125 - lovesegfault:opt-dist-specify-rustc-perf, r=Mark-Simulacrum
feat(tools/opt-dist): allow local builds to specify a rustc-perf checkout This is a first step towards allowing `opt-dist` to work in a sandboxed / air-gapped environment, as it allows users to bypass the ad-hoc download of `rustc-perf`.
2 parents ac385a5 + c3c9783 commit 8387315

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tools/opt-dist/src/main.rs

+6
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ enum EnvironmentCmd {
6969
#[arg(long, default_value = "opt-artifacts")]
7070
artifact_dir: Utf8PathBuf,
7171

72+
/// Checkout directory of `rustc-perf`, it will be fetched automatically if unspecified.
73+
#[arg(long)]
74+
rustc_perf_checkout_dir: Option<Utf8PathBuf>,
75+
7276
/// Is LLVM for `rustc` built in shared library mode?
7377
#[arg(long, default_value_t = true)]
7478
llvm_shared: bool,
@@ -109,6 +113,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
109113
llvm_dir,
110114
python,
111115
artifact_dir,
116+
rustc_perf_checkout_dir,
112117
llvm_shared,
113118
use_bolt,
114119
skipped_tests,
@@ -121,6 +126,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
121126
.host_llvm_dir(llvm_dir)
122127
.artifact_dir(artifact_dir)
123128
.build_dir(checkout_dir)
129+
.prebuilt_rustc_perf(rustc_perf_checkout_dir)
124130
.shared_llvm(llvm_shared)
125131
.use_bolt(use_bolt)
126132
.skipped_tests(skipped_tests)

0 commit comments

Comments
 (0)