Open
Description
Currently, we unconditionally recompile bootstrap on all builds, like libstd. In most cases, this is unnecessary: bootstrap is rarely changed and it's confusing that we have to build a whole rust program before processing x.py --help
. Additionally, it means that when we add the new shell script entrypoints, we'd have to replicate all of bootstrap.py's logic for finding config.toml and the build directory. If we can download bootstrap through rustup, it will greatly simplify all that logic.
Most of this work has already been done in #98483. The work left is to actually download the generated artifact in bootstrap.py.
cc @dvtkrlbs
Mentoring instructions:
- Add a new
download_or_build_bootstrap
function tosrc/bootstrap/bootstrap.py
. - If there are changes to src/bootstrap (you can find these with
git diff-index --quiet HEAD -- src/bootstrap
), then always rebuild it from source. - Otherwise, download it from ci-artifacts.rust-lang.org, as configured by
stage0.json
- you may have to modify theStage0Toolchain
python object to load this configuration.
Helps with #94829.