Recently, the defaults for x.py
, the tool used to bootstrap the Rust compiler from source, changed. If you regularly contribute to Rust, this might affect your workflow.
What changes were made?
-
The default stage is now dependent on the subcommand:
dist
: stage 2build
: stage 1test
: stage 1doc
: stage 0
-
stage 1
rustc
artifacts are no longer built byx.py build --stage 1
. To get the old behavior back, usex.py build --stage 1 src/rustc
. The new behavior forbuild --stage 1
builds everything exceptrustc
, which includes the standard library,rustdoc
, and various other tools (if the tools are enabled). -
debuginfo
now defaults to1
whendebug = true
. Previously, the default was 2.
Why were the changes made?
Previously, x.py build
would build rustc
twice:
build/stage0-std
build/stage0-rustc
build/stage1-std
build/stage1-rustc
Normally, contributors only want to build the compiler once, which lets them test their changes quickly. After this change, that's now the default:
build/stage0-std
build/stage0-rustc
build/stage1-std
debuginfo = 2
generates several gigabytes of debug information,
making the previous default settings for debug = true
very painful.
For a detailed rationale of the changes, as well as more information about the alternatives considered, see
- the MCP
- the implementation PR
- the Zulip stream