]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/compile.rs
Add test cases for issue #26186
[rust.git] / src / bootstrap / compile.rs
index 186b5e92d33e35dfa5c31fe79798e7d565b2b99d..6a734ab517715be80d3607304106dab493d3d1ca 100644 (file)
@@ -1173,7 +1173,12 @@ fn run(self, builder: &Builder<'_>) -> Compiler {
                 // (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));
+                    }
                 }
             }
         }