about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-08-30 19:56:58 +0300
committeronur-ozkan <work@onurozkan.dev>2024-09-08 17:52:09 +0300
commitea34bb045264466c6b3bc63caf64264de219ad77 (patch)
tree94e87ea5371d94cce1696c2cd16b16346f3bdc64 /src/bootstrap
parent23df3a9eeb01d3a50b2ce02db9f69e1d3e37caec (diff)
downloadrust-ea34bb045264466c6b3bc63caf64264de219ad77.tar.gz
rust-ea34bb045264466c6b3bc63caf64264de219ad77.zip
print incompatible options even if we don't download
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/download.rs41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/bootstrap/src/core/download.rs b/src/bootstrap/src/core/download.rs
index 25493c1f55b..d8b39ac0b6d 100644
--- a/src/bootstrap/src/core/download.rs
+++ b/src/bootstrap/src/core/download.rs
@@ -736,27 +736,6 @@ download-rustc = false
         if program_out_of_date(&llvm_stamp, &key) && !self.dry_run() {
             self.download_ci_llvm(&llvm_sha);
 
-            if let Some(config_path) = &self.config {
-                let current_config_toml = Self::get_toml(config_path).unwrap();
-
-                match self.get_builder_toml("ci-llvm") {
-                    Ok(ci_config_toml) => {
-                        check_incompatible_options_for_ci_llvm(current_config_toml, ci_config_toml)
-                            .unwrap();
-                    }
-                    Err(e) if e.to_string().contains("unknown field") => {
-                        println!(
-                            "WARNING: CI rustc has some fields that are no longer supported in bootstrap; download-rustc will be disabled."
-                        );
-                        println!("HELP: Consider rebasing to a newer commit if available.");
-                    }
-                    Err(e) => {
-                        eprintln!("ERROR: Failed to parse CI LLVM config.toml: {e}");
-                        exit!(2);
-                    }
-                };
-            };
-
             if self.should_fix_bins_and_dylibs() {
                 for entry in t!(fs::read_dir(llvm_root.join("bin"))) {
                     self.fix_bin_or_dylib(&t!(entry).path());
@@ -789,6 +768,26 @@ download-rustc = false
 
             t!(fs::write(llvm_stamp, key));
         }
+
+        if let Some(config_path) = &self.config {
+            let current_config_toml = Self::get_toml(config_path).unwrap();
+
+            match self.get_builder_toml("ci-llvm") {
+                Ok(ci_config_toml) => {
+                    t!(check_incompatible_options_for_ci_llvm(current_config_toml, ci_config_toml));
+                }
+                Err(e) if e.to_string().contains("unknown field") => {
+                    println!(
+                        "WARNING: CI LLVM has some fields that are no longer supported in bootstrap; download-ci-llvm will be disabled."
+                    );
+                    println!("HELP: Consider rebasing to a newer commit if available.");
+                }
+                Err(e) => {
+                    eprintln!("ERROR: Failed to parse CI LLVM config.toml: {e}");
+                    exit!(2);
+                }
+            };
+        };
     }
 
     #[cfg(not(feature = "bootstrap-self-test"))]