This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff 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- cmd ( & [
39+ let mut cmd = cmd ( & [
4040 env. cargo_stage_0 ( ) . as_str ( ) ,
4141 "run" ,
4242 "-p" ,
@@ -61,7 +61,16 @@ 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 ( ) )
64+ . workdir ( & env. rustc_perf_dir ( ) ) ;
65+
66+ // Respect `.cargo/config.toml` in the rustc source. This is useful when the
67+ // source is from a tarball and contains vendored source settings.
68+ let dot_cargo_config_toml = env. checkout_path ( ) . join ( ".cargo" ) . join ( "config.toml" ) ;
69+ if dot_cargo_config_toml. is_file ( ) {
70+ cmd. arg ( "--cargo-config" ) . arg ( dot_cargo_config_toml) ;
71+ }
72+
73+ cmd
6574}
6675
6776/// Describes which `llvm-profdata` binary should be used for merging PGO profiles.
You can’t perform that action at this time.
0 commit comments