Skip to content

Move distributed std's profile settings to its workspace - #158264

Open
adamgemmell wants to merge 8 commits into
rust-lang:mainfrom
adamgemmell:dev/adagem01/diststd-mode
Open

Move distributed std's profile settings to its workspace#158264
adamgemmell wants to merge 8 commits into
rust-lang:mainfrom
adamgemmell:dev/adagem01/diststd-mode

Conversation

@adamgemmell

@adamgemmell adamgemmell commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

View all comments

The configuration used by std needs to be moved to somewhere the new build-std can see it. This PR moves settings that Cargo can model in its profile to the dist profile and ensures that bootstrap does not try to override them.

This PR adds a new Mode, DistStd, to bootstrap, as proposed by @Kobzol a while ago, which is used when building the standard library during x dist builds. This mode:

  • Uses the dist profile in the library workspace, added in Move bootstrap configuration to library workspace #149514
    • Normal builds revert back to using release/dev, which fixes building std without optimisations
  • Disallows overriding any profile fields. Configuration in dist builds that do this should instead place the configuration in the library workspace so that it can also be used by build-std.

Note that RUSTFLAGS can still be set based on configuration, and this will be addressed in an upcoming patch as we still need to work out how build-std can consume target-specific configuration. Probably this will go in the cargo config.

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

Labels

A-bootstrap-stamp Area: bootstrap stamp logic A-testsuite Area: The testsuite used to check the correctness of rustc 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.

7 participants