Skip to content

Remove --all-targets flag from x check - #160681

Open
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:bootstrap-check-all-targets
Open

Remove --all-targets flag from x check#160681
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:bootstrap-check-all-targets

Conversation

@Kobzol

@Kobzol Kobzol commented Aug 7, 2026

Copy link
Copy Markdown
Member

Chris was trying to get x check library --all-targets working in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Checking.20std.20tests.20without.20building/with/613735399.

I took a look into this and realized that the x check --all-targets flag is literally unused - nothing in bootstrap was reading it. So the compiler and library were never checked with --all-targets, but on the other hands all tools are checked with --all-targets (or equivalent) by default, even without the flag.

So I think that we have two options:

  1. Actually respect x check --all-targets, and only check all targets for tools when the flag is passed. So checking tools would do less work by default.
  2. Remove the flag, and always check all targets. So checking the compiler will do a bit more work. This is what I decided to do in this PR.

Note that checking std with --all-targets is broken, it just doesn't seem to work when we just pass --all-targets to it.

Happy to hear thoughts on this.

@rustbot

rustbot commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@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 Aug 7, 2026
@rustbot

rustbot commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

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

@rust-log-analyzer

This comment has been minimized.

And always run `check --all-targets` when checking the compiler.
@Kobzol
Kobzol force-pushed the bootstrap-check-all-targets branch from 7070a7b to a5f199d Compare August 7, 2026 10:14
@Zalathar

Zalathar commented Aug 8, 2026

Copy link
Copy Markdown
Member

Does this end up checking the compiler crates twice, once as a library crate and once again with cfg(test) for unit tests?

(That might still be desirable, but if so then it’s effectively double the work.)

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