Skip to content

Commit

Permalink
use Config::get_builder_toml for ci-rustc config parsing
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Aug 30, 2024
1 parent 0ad00dd commit 087c935
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2346,18 +2346,15 @@ impl Config {
self.download_ci_rustc(commit);

if let Some(config_path) = &self.config {
let builder_config_path =
self.out.join(self.build.triple).join("ci-rustc").join(BUILDER_CONFIG_FILENAME);

let ci_config_toml = match Self::get_toml(&builder_config_path) {
let ci_config_toml = match self.get_builder_toml("ci-rustc") {
Ok(ci_config_toml) => ci_config_toml,
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.");
return None;
},
Err(e) => {
eprintln!("ERROR: Failed to parse CI rustc config at '{}': {e}", builder_config_path.display());
eprintln!("ERROR: Failed to parse CI rustc config.toml: {e}");
exit!(2);
},
};
Expand Down

0 comments on commit 087c935

Please sign in to comment.