@@ -2332,27 +2332,29 @@ impl Config {
2332
2332
Some ( commit) => {
2333
2333
self . download_ci_rustc ( commit) ;
2334
2334
2335
- let builder_config_path =
2336
- self . out . join ( self . build . triple ) . join ( "ci-rustc/builder-config" ) ;
2337
- let ci_config_toml = Self :: get_toml ( & builder_config_path) ;
2338
- let current_config_toml = Self :: get_toml ( self . config . as_ref ( ) . unwrap ( ) ) ;
2339
-
2340
- // Check the config compatibility
2341
- let res = check_incompatible_options_for_ci_rustc (
2342
- current_config_toml,
2343
- ci_config_toml,
2344
- ) ;
2335
+ if let Some ( config_path) = & self . config {
2336
+ let builder_config_path =
2337
+ self . out . join ( self . build . triple ) . join ( "ci-rustc/builder-config" ) ;
2338
+ let ci_config_toml = Self :: get_toml ( & builder_config_path) ;
2339
+ let current_config_toml = Self :: get_toml ( config_path) ;
2340
+
2341
+ // Check the config compatibility
2342
+ let res = check_incompatible_options_for_ci_rustc (
2343
+ current_config_toml,
2344
+ ci_config_toml,
2345
+ ) ;
2345
2346
2346
- let disable_ci_rustc_if_incompatible =
2347
- env:: var_os ( "DISABLE_CI_RUSTC_IF_INCOMPATIBLE" )
2347
+ let disable_ci_rustc_if_incompatible =
2348
+ env:: var_os ( "DISABLE_CI_RUSTC_IF_INCOMPATIBLE" )
2348
2349
. is_some_and ( |s| s == "1" || s == "true" ) ;
2349
2350
2350
- if disable_ci_rustc_if_incompatible && res. is_err ( ) {
2351
- println ! ( "WARNING: download-rustc is disabled with `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` env." ) ;
2352
- return None ;
2353
- }
2351
+ if disable_ci_rustc_if_incompatible && res. is_err ( ) {
2352
+ println ! ( "WARNING: download-rustc is disabled with `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` env." ) ;
2353
+ return None ;
2354
+ }
2354
2355
2355
- res. unwrap ( ) ;
2356
+ res. unwrap ( ) ;
2357
+ }
2356
2358
2357
2359
Some ( commit. clone ( ) )
2358
2360
}
0 commit comments