about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-07-23 20:28:19 +0300
committeronur-ozkan <work@onurozkan.dev>2024-07-23 20:51:35 +0300
commit2f55cedf501e06f932787248a17e6aaffd9785f1 (patch)
tree71f569fb6a24007fcf72deead2f09bbe16684c95
parentd53dc752d2bc0a9e7f7e2e5f82aff03a6d222614 (diff)
downloadrust-2f55cedf501e06f932787248a17e6aaffd9785f1.tar.gz
rust-2f55cedf501e06f932787248a17e6aaffd9785f1.zip
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 <work@onurozkan.dev>
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 3e79acad1c4..9bbebf9b870 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,