From 2f55cedf501e06f932787248a17e6aaffd9785f1 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Tue, 23 Jul 2024 20:28:19 +0300 Subject: [PATCH] ensure std step before preparing sysroot When using download-rustc, any stage other than 0 or 1 (e.g., cargo +stage2 build/doc) will fail to find std while compiling on simple rust sources. Ensuring the rustc step fixes this issue. Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/compile.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 3e79acad1c4b2..9bbebf9b87037 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1700,6 +1700,7 @@ impl Step for Assemble { // If we're downloading a compiler from CI, we can use the same compiler for all stages other than 0. if builder.download_rustc() { + builder.ensure(Std::new(target_compiler, target_compiler.host)); let sysroot = builder.ensure(Sysroot { compiler: target_compiler, force_recompile: false }); // Ensure that `libLLVM.so` ends up in the newly created target directory,