diff options
| author | Tuna <dvt.tnhn.krlbs@icloud.com> | 2022-09-14 18:17:05 -0500 |
|---|---|---|
| committer | Joshua Nelson <jnelson@cloudflare.com> | 2022-09-14 18:26:59 -0500 |
| commit | 282b1e476883fbfd8924535185512199b4eaff3c (patch) | |
| tree | 873878e8bcb50cd1af88c79b77e89c87884f922c /src/bootstrap | |
| parent | 6f0c4a6c5c36f1f8f433a12e10a29918f3d40a31 (diff) | |
| download | rust-282b1e476883fbfd8924535185512199b4eaff3c.tar.gz rust-282b1e476883fbfd8924535185512199b4eaff3c.zip | |
Distribute bootstrap in CI artifacts
- Add a new `bootstrap` component Originally, we planned to combine this with the `rust-dev` component. However, I realized that would force LLVM to be redownloaded whenever bootstrap is modified. LLVM is a much larger download, so split this to get better caching. - Build bootstrap for all tier 1 and 2 targets
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/dist.rs | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 14e8ebd6876..8ec64657f47 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -723,6 +723,7 @@ impl<'a> Builder<'a> { dist::Miri, dist::LlvmTools, dist::RustDev, + dist::Bootstrap, dist::Extended, // It seems that PlainSourceTarball somehow changes how some of the tools // perceive their dependencies (see #93033) which would invalidate fingerprints diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 1a59b3958f1..679f017c770 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -2050,6 +2050,41 @@ impl Step for RustDev { } } +// Tarball intended for internal consumption to ease rustc/std development. +// +// Should not be considered stable by end users. +#[derive(Clone, Debug, Eq, Hash, PartialEq)] +pub struct Bootstrap { + pub target: TargetSelection, +} + +impl Step for Bootstrap { + type Output = Option<GeneratedTarball>; + const DEFAULT: bool = false; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { + run.alias("bootstrap") + } + + fn make_run(run: RunConfig<'_>) { + run.builder.ensure(Bootstrap { target: run.target }); + } + + fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> { + let target = self.target; + + let tarball = Tarball::new(builder, "bootstrap", &target.triple); + + let bootstrap_outdir = &builder.bootstrap_out; + for file in &["bootstrap", "llvm-config-wrapper", "rustc", "rustdoc", "sccache-plus-cl"] { + tarball.add_file(bootstrap_outdir.join(file), "bootstrap/bin", 0o755); + } + + Some(tarball.generate()) + } +} + /// Tarball containing a prebuilt version of the build-manifest tool, intended to be used by the /// release process to avoid cloning the monorepo and building stuff. /// |
