mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
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
This commit is contained in:
@@ -1325,7 +1325,11 @@ pub(crate) fn parse_inner(args: &[String], get_toml: impl Fn(&Path) -> TomlConfi
|
||||
// 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;
|
||||
|
||||
@@ -317,6 +317,12 @@ fn run(self, build_cli: impl FnOnce(&Tarball<'a>, &mut BootstrapCommand)) -> Gen
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user