about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-01-02 20:41:52 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-01-02 21:00:14 +0800
commit552c1f5f45ec8b8cb5c9427754a7c3d16ca9f741 (patch)
tree43a15fd7e36b0ffa903f801bcb86946acc8f2136
parentc528b8c67895bfe7fdcdfeb56ec5bf6ef928dcd7 (diff)
downloadrust-552c1f5f45ec8b8cb5c9427754a7c3d16ca9f741.tar.gz
rust-552c1f5f45ec8b8cb5c9427754a7c3d16ca9f741.zip
bootstrap: temporarily flip `compile::Rustc` vs `compile::Assemble`
The PathSet prefix matching unfortunately also has implications for `./x
build compiler`, because the path filter `"compiler"` gets consumed by
`compile::Rustc` step first after PathSet prefix matching, whereas
before PathSet prefix matching, the later-registered `compile::Assemble`
step would've consumed the `"compiler"` path filter.

This merely papers over the issue with PathSet prefix handling to
unblock contributors for using `./x build compiler`.
-rw-r--r--src/bootstrap/src/core/builder/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs
index c3a74683cd3..aaee1b08a40 100644
--- a/src/bootstrap/src/core/builder/mod.rs
+++ b/src/bootstrap/src/core/builder/mod.rs
@@ -825,8 +825,12 @@ impl<'a> Builder<'a> {
         match kind {
             Kind::Build => describe!(
                 compile::Std,
-                compile::Rustc,
+                // FIXME(#135022): `compile::Assemble` **must** come before `compile::Rustc` after
+                // `PathSet` also permits prefix-matching, because `compile::Rustc` can consume the
+                // `"compiler"` path filter first, causing `compile::Assemble` to no longer run when
+                // the user writes `./x build compiler --stage 0`.
                 compile::Assemble,
+                compile::Rustc,
                 compile::CodegenBackend,
                 compile::StartupObjects,
                 tool::BuildManifest,