From 552c1f5f45ec8b8cb5c9427754a7c3d16ca9f741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:41:52 +0800 Subject: [PATCH] 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`. --- src/bootstrap/src/core/builder/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index c3a74683cd329..aaee1b08a4034 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,