Skip to content

Commit 4b32afb

Browse files
authored
Unrolled build for rust-lang#128822
Rollup merge of rust-lang#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 rust-lang#122709 r? Kobzol
2 parents 899eb03 + ff0d37c commit 4b32afb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/bootstrap/src/core/config/config.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,11 @@ impl Config {
13251325
// Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path,
13261326
// but not if `config.toml` hasn't been created.
13271327
let mut toml = if !using_default_path || toml_path.exists() {
1328-
config.config = Some(toml_path.clone());
1328+
config.config = Some(if cfg!(not(feature = "bootstrap-self-test")) {
1329+
toml_path.canonicalize().unwrap()
1330+
} else {
1331+
toml_path.clone()
1332+
});
13291333
get_toml(&toml_path)
13301334
} else {
13311335
config.config = None;

src/bootstrap/src/utils/tarball.rs

+6
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ impl<'a> Tarball<'a> {
317317
channel::write_commit_hash_file(&self.overlay_dir, &info.sha);
318318
channel::write_commit_info_file(&self.overlay_dir, info);
319319
}
320+
321+
// Add config file if present.
322+
if let Some(config) = &self.builder.config.config {
323+
self.add_renamed_file(config, &self.overlay_dir, "builder-config");
324+
}
325+
320326
for file in self.overlay.legal_and_readme() {
321327
self.builder.install(&self.builder.src.join(file), &self.overlay_dir, 0o644);
322328
}

0 commit comments

Comments
 (0)