Skip to content

Commit

Permalink
Auto merge of #76573 - Mark-Simulacrum:bootstrap-with-external-llvm, …
Browse files Browse the repository at this point in the history
…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`
  • Loading branch information
bors committed Sep 11, 2020
2 parents a742547 + 4f2d941 commit d778203
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bootstrap/dist.rs
Expand Up @@ -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");
Expand All @@ -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);
Expand Down

0 comments on commit d778203

Please sign in to comment.