Skip to content

Download a pre-compiled bootstrap from CI #99989

@jyn514

Description

@jyn514

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:

  1. Add a new download_or_build_bootstrap function to src/bootstrap/bootstrap.py.
  2. 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.
  3. Otherwise, download it from ci-artifacts.rust-lang.org, as configured by stage0.json - you may have to modify the Stage0Toolchain python object to load this configuration.

Helps with #94829.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions