File tree 1 file changed +11
-2
lines changed
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(
36
36
// Run rustc-perf benchmarks
37
37
// Benchmark using profile_local with eprintln, which essentially just means
38
38
// don't actually benchmark -- just make sure we run rustc a bunch of times.
39
- cmd ( & [
39
+ let mut cmd = cmd ( & [
40
40
env. cargo_stage_0 ( ) . as_str ( ) ,
41
41
"run" ,
42
42
"-p" ,
@@ -61,7 +61,16 @@ fn init_compiler_benchmarks(
61
61
. env ( "RUST_LOG" , "collector=debug" )
62
62
. env ( "RUSTC" , env. rustc_stage_0 ( ) . as_str ( ) )
63
63
. 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 = cmd. arg ( "--cargo-config" ) . arg ( dot_cargo_config_toml) ;
71
+ }
72
+
73
+ cmd
65
74
}
66
75
67
76
/// Describes which `llvm-profdata` binary should be used for merging PGO profiles.
You can’t perform that action at this time.
0 commit comments