Skip to content

Commit a1af14a

Browse files
Revert "Rollup merge of rust-lang#125930 - weihanglo:opt-dist-respect-cargo-config, r=Kobzol"
This reverts commit 610592b, reversing changes made to d9e149d.
1 parent a330e49 commit a1af14a

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

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

-7
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ pub struct Environment {
1717
host_llvm_dir: Utf8PathBuf,
1818
/// List of test paths that should be skipped when testing the optimized artifacts.
1919
skipped_tests: Vec<String>,
20-
/// Arguments passed to `rustc-perf --cargo-config <value>` when running benchmarks.
21-
#[builder(default)]
22-
benchmark_cargo_config: Vec<String>,
2320
/// Directory containing a pre-built rustc-perf checkout.
2421
#[builder(default)]
2522
prebuilt_rustc_perf: Option<Utf8PathBuf>,
@@ -97,10 +94,6 @@ impl Environment {
9794
pub fn skipped_tests(&self) -> &[String] {
9895
&self.skipped_tests
9996
}
100-
101-
pub fn benchmark_cargo_config(&self) -> &[String] {
102-
&self.benchmark_cargo_config
103-
}
10497
}
10598

10699
/// What is the extension of binary executables on this platform?

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

-6
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ enum EnvironmentCmd {
9090

9191
#[clap(flatten)]
9292
shared: SharedArgs,
93-
94-
/// Arguments passed to `rustc-perf --cargo-config <value>` when running benchmarks.
95-
#[arg(long)]
96-
benchmark_cargo_config: Vec<String>,
9793
},
9894
/// Perform an optimized build on Linux CI, from inside Docker.
9995
LinuxCi {
@@ -123,7 +119,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
123119
llvm_shared,
124120
use_bolt,
125121
skipped_tests,
126-
benchmark_cargo_config,
127122
shared,
128123
} => {
129124
let env = EnvironmentBuilder::default()
@@ -137,7 +132,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
137132
.shared_llvm(llvm_shared)
138133
.use_bolt(use_bolt)
139134
.skipped_tests(skipped_tests)
140-
.benchmark_cargo_config(benchmark_cargo_config)
141135
.build()?;
142136

143137
(env, shared.build_args)

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

+2-12
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn init_compiler_benchmarks(
3636
// Run rustc-perf benchmarks
3737
// Benchmark using profile_local with eprintln, which essentially just means
3838
// don't actually benchmark -- just make sure we run rustc a bunch of times.
39-
let mut cmd = cmd(&[
39+
cmd(&[
4040
env.cargo_stage_0().as_str(),
4141
"run",
4242
"-p",
@@ -61,17 +61,7 @@ fn init_compiler_benchmarks(
6161
.env("RUST_LOG", "collector=debug")
6262
.env("RUSTC", env.rustc_stage_0().as_str())
6363
.env("RUSTC_BOOTSTRAP", "1")
64-
.workdir(&env.rustc_perf_dir());
65-
66-
// This propagates cargo configs to `rustc-perf --cargo-config`,
67-
// which is particularly useful when the environment is air-gapped,
68-
// and you want to use the default set of training crates vendored
69-
// in the rustc-src tarball.
70-
for config in env.benchmark_cargo_config() {
71-
cmd = cmd.arg("--cargo-config").arg(config);
72-
}
73-
74-
cmd
64+
.workdir(&env.rustc_perf_dir())
7565
}
7666

7767
/// Describes which `llvm-profdata` binary should be used for merging PGO profiles.

0 commit comments

Comments
 (0)