about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2021-12-09 12:21:00 -0600
committerAaron Hill <aa1ronham@gmail.com>2021-12-09 13:41:39 -0600
commitfaf407d5dccacdcaa0ee40bfee18847226c570f7 (patch)
treeaa27a24cbf83715f09f91844e175e106b29b1f72 /src/bootstrap
parent0b42deaccc2cbe17a68067aa5fdb76104369e1fd (diff)
downloadrust-faf407d5dccacdcaa0ee40bfee18847226c570f7.tar.gz
rust-faf407d5dccacdcaa0ee40bfee18847226c570f7.zip
Don't copy llvm tools to sysroot when using download-ci-llvm
Fixes #91710
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/compile.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 186b5e92d33..6a734ab5177 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -1173,7 +1173,12 @@ impl Step for Assemble {
                 // (e.g. the `bootimage` crate).
                 for tool in LLVM_TOOLS {
                     let tool_exe = exe(tool, target_compiler.host);
-                    builder.copy(&llvm_bin_dir.join(&tool_exe), &libdir_bin.join(&tool_exe));
+                    let src_path = llvm_bin_dir.join(&tool_exe);
+                    // When using `donwload-ci-llvm`, some of the tools
+                    // may not exist, so skip trying to copy them.
+                    if src_path.exists() {
+                        builder.copy(&src_path, &libdir_bin.join(&tool_exe));
+                    }
                 }
             }
         }