diff options
| author | Joseph Ryan <josephryan3.14@gmail.com> | 2023-10-02 16:50:23 -0700 |
|---|---|---|
| committer | Joseph Ryan <josephryan3.14@gmail.com> | 2023-10-03 11:25:07 -0700 |
| commit | f55c87966923fb8d3ba86da875225aaf687a187a (patch) | |
| tree | 5221130730ed5a12f25f54fe9be7e280e32a5093 | |
| parent | 5333b878c8bc1c4267a67ea3682663629e47541a (diff) | |
| download | rust-f55c87966923fb8d3ba86da875225aaf687a187a.tar.gz rust-f55c87966923fb8d3ba86da875225aaf687a187a.zip | |
bootstrap: make copying linker binaries conditional
| -rw-r--r-- | src/bootstrap/compile.rs | 12 |
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"); |
