about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2024-09-03 21:03:46 +0300
committeronur-ozkan <work@onurozkan.dev>2024-09-03 21:03:46 +0300
commitb5d07fd3567f5ca42b677ffd9cf4756c5dbf12ba (patch)
tree18c2931d8284c693fbb75e1e6451896766de93b5
parentd6c8169c186ab16a3404cd0d0866674018e8a19e (diff)
downloadrust-b5d07fd3567f5ca42b677ffd9cf4756c5dbf12ba.tar.gz
rust-b5d07fd3567f5ca42b677ffd9cf4756c5dbf12ba.zip
copy rustc rustlib artifacts from ci-rustc
We recently had an issue because some rustlib files were missing (like: "error[E0463]: can't find crate for rustc_ast")
when building tools that rely on rustc. This patch fixes that by copying those files as required.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index eef548033f1..71e217bbbfc 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -931,7 +931,12 @@ impl Step for Rustc {
         // NOTE: the ABI of the beta compiler is different from the ABI of the downloaded compiler,
         // so its artifacts can't be reused.
         if builder.download_rustc() && compiler.stage != 0 {
-            builder.ensure(Sysroot { compiler, force_recompile: false });
+            let sysroot = builder.ensure(Sysroot { compiler, force_recompile: false });
+            cp_rustc_component_to_ci_sysroot(
+                builder,
+                &sysroot,
+                builder.config.ci_rustc_dev_contents(),
+            );
             return compiler.stage;
         }