about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-27 13:27:22 +0000
committerbors <bors@rust-lang.org>2022-04-27 13:27:22 +0000
commitff18038d750d5b692b4896c338e33ed134fe4ba2 (patch)
tree8352f26e13019e5a63f3d2e34ce88713fe033af6 /src/bootstrap/builder.rs
parent2799141fdec79f2eb1ce75f27bf9982a495f72d8 (diff)
parent7885ade98434c765dc218ba7d396c8c4b7827fe8 (diff)
downloadrust-ff18038d750d5b692b4896c338e33ed134fe4ba2.tar.gz
rust-ff18038d750d5b692b4896c338e33ed134fe4ba2.zip
Auto merge of #95170 - jyn514:ci-llvm, r=Mark-Simulacrum
Move `download-ci-llvm` out of bootstrap.py

This is ready for review. It has been tested on Windows, Linux, and NixOS.

The second commit ports the changes from https://github.com/rust-lang/rust/pull/95234 to Rust; I can remove it if desired.

Helps with https://github.com/rust-lang/rust/issues/94829.

As a follow-up, this makes it possible to avoid downloading llvm until it's needed for building `rustc_llvm`; it would be nice to do that, but it shouldn't go in the first draft. It might also be possible to avoid requiring python until tests run (currently there's a check in `sanity.rs`), but I haven't looked too much into that.

`@rustbot` label +A-rustbuild
Diffstat (limited to 'src/bootstrap/builder.rs')
-rw-r--r--src/bootstrap/builder.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index f803388f0a6..dd45bd3a213 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -12,7 +12,6 @@ use std::process::Command;
 use std::time::{Duration, Instant};
 
 use crate::cache::{Cache, Interned, INTERNER};
-use crate::check;
 use crate::compile;
 use crate::config::{SplitDebuginfo, TargetSelection};
 use crate::dist;
@@ -25,6 +24,7 @@ use crate::test;
 use crate::tool::{self, SourceType};
 use crate::util::{self, add_dylib_path, add_link_lib_path, exe, libdir, output, t};
 use crate::EXTRA_CHECK_CFGS;
+use crate::{check, Config};
 use crate::{Build, CLang, DocTests, GitRepo, Mode};
 
 pub use crate::Compiler;
@@ -960,6 +960,11 @@ impl<'a> Builder<'a> {
         None
     }
 
+    /// Convenience wrapper to allow `builder.llvm_link_shared()` instead of `builder.config.llvm_link_shared(&builder)`.
+    pub(crate) fn llvm_link_shared(&self) -> bool {
+        Config::llvm_link_shared(self)
+    }
+
     /// Prepares an invocation of `cargo` to be run.
     ///
     /// This will create a `Command` that represents a pending execution of