]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/config.rs
Rollup merge of #104015 - alex:remove-kernel, r=oli-obk
[rust.git] / src / bootstrap / config.rs
index 21dc11c48081e8f18ac2da327378772b85a5cd8c..ba50ce9ec2426e99c362a666afdd5f2524995058 100644 (file)
@@ -80,7 +80,7 @@ pub struct Config {
     pub keep_stage_std: Vec<u32>,
     pub src: PathBuf,
     /// defaults to `config.toml`
-    pub config: PathBuf,
+    pub config: Option<PathBuf>,
     pub jobs: Option<u32>,
     pub cmd: Subcommand,
     pub incremental: bool,
@@ -926,8 +926,10 @@ pub fn parse(args: &[String]) -> Config {
         // Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
         // but not if `config.toml` hasn't been created.
         let mut toml = if !using_default_path || toml_path.exists() {
+            config.config = Some(toml_path.clone());
             get_toml(&toml_path)
         } else {
+            config.config = None;
             TomlConfig::default()
         };
 
@@ -942,7 +944,6 @@ pub fn parse(args: &[String]) -> Config {
         }
 
         config.changelog_seen = toml.changelog_seen;
-        config.config = toml_path;
 
         let build = toml.build.unwrap_or_default();