about summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2025-04-10 17:26:25 +0300
committeronur-ozkan <work@onurozkan.dev>2025-05-30 21:04:25 +0300
commit305890541f4777488305bcc154617b9c6f73f60c (patch)
treead98c2a2e36ca9ab07a5a77dfeb4f40cc920416b
parent60394a807d6c37a274bac1b774e53cb6660ed790 (diff)
downloadrust-305890541f4777488305bcc154617b9c6f73f60c.tar.gz
rust-305890541f4777488305bcc154617b9c6f73f60c.zip
fix fs bug on CI and update ming-check-1 Dockerfile
Signed-off-by: onur-ozkan <work@onurozkan.dev>
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs8
-rw-r--r--src/ci/docker/host-x86_64/mingw-check-1/Dockerfile1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index 633e6239f95..f1e0717e39c 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -788,6 +788,14 @@ impl Step for StdLink {
             }
         } else if compiler.stage == 0 {
             let sysroot = builder.out.join(compiler.host.triple).join("stage0-sysroot");
+
+            if builder.local_rebuild {
+                // On local rebuilds this path might be a symlink to the project root,
+                // which can be read-only (e.g., on CI). So remove it before copying
+                // the stage0 lib.
+                let _ = fs::remove_dir_all(sysroot.join("lib/rustlib/src/rust"));
+            }
+
             builder.cp_link_r(&builder.initial_sysroot.join("lib"), &sysroot.join("lib"));
         } else {
             if builder.download_rustc() {
diff --git a/src/ci/docker/host-x86_64/mingw-check-1/Dockerfile b/src/ci/docker/host-x86_64/mingw-check-1/Dockerfile
index 4608faa7df1..a877de1f7b2 100644
--- a/src/ci/docker/host-x86_64/mingw-check-1/Dockerfile
+++ b/src/ci/docker/host-x86_64/mingw-check-1/Dockerfile
@@ -47,6 +47,7 @@ COPY host-x86_64/mingw-check-1/validate-error-codes.sh /scripts/
 ENV SCRIPT \
            /scripts/check-default-config-profiles.sh && \
            python3 ../x.py build --stage 0 src/tools/build-manifest && \
+           python3 ../x.py test --stage 0 src/tools/compiletest && \
            python3 ../x.py check compiletest --set build.compiletest-use-stage0-libtest=true && \
            python3 ../x.py check --stage 1 --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \
            python3 ../x.py check --stage 1 --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \