We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f98f710 commit d6f178aCopy full SHA for d6f178a
src/bootstrap/src/core/build_steps/compile.rs
@@ -789,6 +789,14 @@ impl Step for StdLink {
789
}
790
} else if compiler.stage == 0 {
791
let sysroot = builder.out.join(compiler.host.triple).join("stage0-sysroot");
792
+
793
+ if builder.local_rebuild {
794
+ // On local rebuilds this path might be a symlink to the project root,
795
+ // which can be read-only (e.g., on CI). So remove it before copying
796
+ // the stage0 lib.
797
+ let _ = fs::remove_dir_all(sysroot.join("lib/rustlib/src/rust"));
798
+ }
799
800
builder.cp_link_r(&builder.initial_sysroot.join("lib"), &sysroot.join("lib"));
801
} else {
802
if builder.download_rustc() {
0 commit comments