Skip to content

bootstrap: Switch download-rustc back on by default for profile = library#154243

Open
jyn514 wants to merge 3 commits intorust-lang:mainfrom
ferrocene:jyn/library-defaults
Open

bootstrap: Switch download-rustc back on by default for profile = library#154243
jyn514 wants to merge 3 commits intorust-lang:mainfrom
ferrocene:jyn/library-defaults

Conversation

@jyn514
Copy link
Member

@jyn514 jyn514 commented Mar 23, 2026

See #142505 for context. There are actually three changes here, I left detailed commit messages.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 23, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 23, 2026

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@rust-log-analyzer

This comment has been minimized.

@jyn514 jyn514 force-pushed the jyn/library-defaults branch from acdf88b to b7aca74 Compare March 23, 2026 09:17
@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Member

Kobzol commented Mar 23, 2026

I'm not sure if we should propagate download-rustc in its current state, tbh. It has been hacky even before the stage0 redesign, and since then I have zero confidence that it works correctly, I expect that there are many issues with it, and I don't think we have the bandwidth at the moment to deal with them. Of course, some people are using download-rustc today and if it works for them, then that's fine. But enabling it by default when we know it's broken does not seem right.

I think that long-term the best solution is to rip out download-rustc completely and reimplement it in a maintainable way.

jyn514 added 3 commits March 23, 2026 10:32
Example output:
```
$ x b compiler
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.02s
NOTE: detected 3 modifications that could affect a build of rustc
- src/bootstrap/src/core/config/config.rs
- src/bootstrap/src/core/download.rs
- src/build_helper/src/git.rs
skipping rustc download due to `download-rustc = 'if-unchanged'`
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
    Finished `release` profile [optimized] target(s) in 0.72s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Build completed successfully in 0:00:05
```
Anything that can change there can also be changed in bootstrap.toml.
We have a separate check to make sure that the local config is
compatable with CI's config.
This was turned off because
`x test --set rust.download-rustc=true --stage=1 library/std` has been
broken for years. The workaround is simple and it's to remove
`test-stage = 1` from the `library` profile defaults.
@jyn514 jyn514 force-pushed the jyn/library-defaults branch from b7aca74 to 0dde8fd Compare March 23, 2026 09:32
@jyn514
Copy link
Member Author

jyn514 commented Mar 23, 2026

I wish you had brought this up a couple years ago when I proposed the stage 0 redesign :/ what would you consider to be a "more maintainable way"?

@jyn514
Copy link
Member Author

jyn514 commented Mar 23, 2026

If it helps, I'm happy to use my work time to maintain download-rustc so that the burden isn't falling on you and the rest of the bootstrap team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants