File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/bootstrap/src/core/config Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2399,6 +2399,19 @@ impl Config {
23992399 Some ( commit) => {
24002400 self . download_ci_rustc ( commit) ;
24012401
2402+ // We never enable `download-rustc` without `download-ci-llvm`. If `self.llvm_from_ci` is false,
2403+ // it means the "if-unchanged" logic has detected some changes in the LLVM submodule.
2404+ if CiEnv :: is_ci ( ) && !self . llvm_from_ci {
2405+ // This happens when LLVM submodule is updated in CI, we should disable ci-rustc without an error
2406+ // to not break CI. For non-CI environments, we should return an error.
2407+ if CiEnv :: is_ci ( ) {
2408+ println ! ( "WARNING: LLVM submodule has changes, `download-rustc` will be disabled." ) ;
2409+ return None ;
2410+ } else {
2411+ panic ! ( "ERROR: LLVM submodule has changes, `download-rustc` can't be used." ) ;
2412+ }
2413+ }
2414+
24022415 if let Some ( config_path) = & self . config {
24032416 let ci_config_toml = match self . get_builder_toml ( "ci-rustc" ) {
24042417 Ok ( ci_config_toml) => ci_config_toml,
You can’t perform that action at this time.
0 commit comments