about summary refs log tree commit diff
path: root/src/bootstrap/compile.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-04 03:38:42 +0000
committerbors <bors@rust-lang.org>2023-10-04 03:38:42 +0000
commita7bb2f67bf8f868401ba90bc0f5b9dc75d1dfe0b (patch)
treeaf6ce8fabe74dcb1c7cd3ab3ad2afb8301acd305 /src/bootstrap/compile.rs
parent4910642aab5c6230dfbf0cafb382700ed3001dab (diff)
parentd4940488a6ae450aef6691e596c2bb102f8cb1fd (diff)
downloadrust-a7bb2f67bf8f868401ba90bc0f5b9dc75d1dfe0b.tar.gz
rust-a7bb2f67bf8f868401ba90bc0f5b9dc75d1dfe0b.zip
Auto merge of #116408 - matthiaskrgr:rollup-hmolg4m, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #115961 (Replace 'mutex' with 'lock' in RwLock documentation)
 - #116146 (Clarify `arg` and `args` documentation)
 - #116363 (Adapt `todo!` documentation to mention displaying custom values)
 - #116365 (bootstrap: make copying linker binaries conditional)
 - #116388 (rustdoc: fix & clean up handling of cross-crate higher-ranked parameters)
 - #116393 (Emit feature gate *warning* for `auto` traits pre-expansion)
 - #116395 (Mark myself as vacation or whatever)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap/compile.rs')
-rw-r--r--src/bootstrap/compile.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index daf0798357b..cf1f97c5b41 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -167,12 +167,14 @@ impl Step for Std {
                 .rustc_snapshot_sysroot()
                 .join("lib")
                 .join("rustlib")
-                .join(&compiler.host.triple)
+                .join(compiler.host.triple)
                 .join("bin");
-            let target_sysroot_bin =
-                builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
-            t!(fs::create_dir_all(&target_sysroot_bin));
-            builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
+            if src_sysroot_bin.exists() {
+                let target_sysroot_bin =
+                    builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
+                t!(fs::create_dir_all(&target_sysroot_bin));
+                builder.cp_r(&src_sysroot_bin, &target_sysroot_bin);
+            }
         }
 
         let mut cargo = builder.cargo(compiler, Mode::Std, SourceType::InTree, target, "build");