]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #82739 - jyn514:separate-stage0-stage1, r=Mark-Simulacrum
authorDylan DPC <dylan.dpc@gmail.com>
Mon, 5 Apr 2021 11:03:38 +0000 (13:03 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Apr 2021 11:03:38 +0000 (13:03 +0200)
commitca9cbea27a2fc0a3f9c7d820f5bd3eeac1ad25d2
treef7c23ca9a988fadc9feee6e8715fff7e4c2c4a44
parente64dbb1f46a3058c6d152a35bd601685cb7cdc09
parent14406df189150a1a79298dd82007c6fd6186fafc
Rollup merge of #82739 - jyn514:separate-stage0-stage1, r=Mark-Simulacrum

Use the beta compiler for building bootstrap tools when `download-rustc` is set

 ## Motivation

This avoids having to rebuild bootstrap and tidy each time you rebase
over master. In particular, it makes rebasing and running `x.py fmt` on
each commit in a branch significantly faster. It also avoids having to
rebuild bootstrap after setting `download-rustc = true`.

 ## Implementation

Instead of extracting the CI artifacts directly to `stage0/`, extract
them to `ci-rustc/` instead. Continue to copy them to the proper
sysroots as necessary for all stages except stage 0.

This also requires `bootstrap.py` to download both stage0 and CI
artifacts and distinguish between the two when checking stamp files.

Note that since tools have to be built by the same compiler that built
`rustc-dev` and the standard library, the downloaded artifacts can't be
reused when building with the beta compiler. To make sure this is still
a good user experience, warn when building with the beta compiler, and
default to building with stage 2.

I tested this by rebasing this PR from edeee915b1c52f97411e57ef6b1a8bd46548a37a over 1c77a1fa3ca574f2a40056f64d498db8efe0d8a8 and confirming that only the bootstrap library itself had to be rebuilt, not any dependencies and not `tidy`. I also tested that a clean build with `x.py build` builds rustdoc exactly once and does no other work, and that `touch src/librustdoc/lib.rs && x.py build` works. `x.py check` still behaves as before (checks using the beta compiler, even if there are changes to `compiler/`).

Helps with https://github.com/rust-lang/rust/issues/81930.

r? `@Mark-Simulacrum`
src/bootstrap/bootstrap.py
src/bootstrap/tool.rs