about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-11 11:16:33 +0000
committerbors <bors@rust-lang.org>2020-09-11 11:16:33 +0000
commitd778203da2157f47af6d1f7ba5f44eb933ee2df1 (patch)
tree19956b21faab62201139b26fbabf50a5fda00a40 /src/bootstrap
parenta7425476e81207c7ff3d229b69172e78a732da5d (diff)
parent4f2d94180ddffcb23cb1f3682242df735eeac03f (diff)
downloadrust-d778203da2157f47af6d1f7ba5f44eb933ee2df1.tar.gz
rust-d778203da2157f47af6d1f7ba5f44eb933ee2df1.zip
Auto merge of #76573 - Mark-Simulacrum:bootstrap-with-external-llvm, r=alexcrichton
Only copy LLVM into rust-dev with internal LLVM

This avoids needing to figure out where to locate each of the components with an
external LLVM. This component isn't manifested for rustup consumption and
generally shouldn't matter for anyone except Rust's CI, so it is fine for it to not be
complete elsewhere.

Fixes #76572.

r? `@alexcrichton`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/dist.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 797a1ce20b4..25d0dad5844 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -2524,6 +2524,14 @@ impl Step for RustDev {
     fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
         let target = self.target;
 
+        /* run only if llvm-config isn't used */
+        if let Some(config) = builder.config.target_config.get(&target) {
+            if let Some(ref _s) = config.llvm_config {
+                builder.info(&format!("Skipping RustDev ({}): external LLVM", target));
+                return None;
+            }
+        }
+
         builder.info(&format!("Dist RustDev ({})", target));
         let _time = timeit(builder);
         let src = builder.src.join("src/llvm-project/llvm");
@@ -2536,6 +2544,7 @@ impl Step for RustDev {
         // Prepare the image directory
         let dst_bindir = image.join("bin");
         t!(fs::create_dir_all(&dst_bindir));
+
         let exe = builder.llvm_out(target).join("bin").join(exe("llvm-config", target));
         builder.install(&exe, &dst_bindir, 0o755);
         builder.install(&builder.llvm_filecheck(target), &dst_bindir, 0o755);