diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-09 18:24:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-09 18:24:57 +0200 |
| commit | 5f1e25e65db7e20471752d8b59c78ca032d5b14d (patch) | |
| tree | 81ebf43f57530e8e93aadd0931b7c1e58866ab58 | |
| parent | 53729366a969304e3db6d26f2500e6682436a5b0 (diff) | |
| parent | ff0d37cb01636da96956553ea823e4c486923d70 (diff) | |
| download | rust-5f1e25e65db7e20471752d8b59c78ca032d5b14d.tar.gz rust-5f1e25e65db7e20471752d8b59c78ca032d5b14d.zip | |
Rollup merge of #128822 - onur-ozkan:add-build-config-in-tarballs, r=Kobzol
add `builder-config` into tarball sources This will be useful for certain scenarios where developers want to know how the tarball sources were generated. We also want this to check for CI rustc incompatible options on bootstrap. Blocker for #122709 r? Kobzol
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/src/utils/tarball.rs | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 14beef20bad..f0a55830167 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1325,7 +1325,11 @@ impl 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()); + config.config = Some(if cfg!(not(feature = "bootstrap-self-test")) { + toml_path.canonicalize().unwrap() + } else { + toml_path.clone() + }); get_toml(&toml_path) } else { config.config = None; diff --git a/src/bootstrap/src/utils/tarball.rs b/src/bootstrap/src/utils/tarball.rs index bfe2f084552..3f7f6214cf6 100644 --- a/src/bootstrap/src/utils/tarball.rs +++ b/src/bootstrap/src/utils/tarball.rs @@ -317,6 +317,12 @@ impl<'a> Tarball<'a> { channel::write_commit_hash_file(&self.overlay_dir, &info.sha); channel::write_commit_info_file(&self.overlay_dir, info); } + + // Add config file if present. + if let Some(config) = &self.builder.config.config { + self.add_renamed_file(config, &self.overlay_dir, "builder-config"); + } + for file in self.overlay.legal_and_readme() { self.builder.install(&self.builder.src.join(file), &self.overlay_dir, 0o644); } |
