about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-07-25 22:34:23 +0000
committerbors <bors@rust-lang.org>2019-07-25 22:34:23 +0000
commit18630677cf6c7ac50e6786c504b35bc09501dbe2 (patch)
treeb6f28ed1be746076ce883fa0ccda880019eb91fd /src/bootstrap
parent890881f8f4c77e8670d4b32104c0325fcfefc90f (diff)
parent1a775b3b55263a82c3e69a942de5d2cdfb374bf1 (diff)
Auto merge of #62990 - Centril:rollup-k9n0hvs, r=Centril
Rollup of 15 pull requests

Successful merges:

 - #60066 (Stabilize the type_name intrinsic in core::any)
 - #60938 (rustdoc: make #[doc(include)] relative to the containing file)
 - #61884 (Stablize Euclidean Modulo (feature euclidean_division))
 - #61890 (Fix some sanity checks)
 - #62528 (Add joining slices of slices with a slice separator, not just a single item)
 - #62707 (Add tests for overlapping explicitly dropped locals in generators)
 - #62735 (Turn `#[global_allocator]` into a regular attribute macro)
 - #62822 (Improve some pointer-related documentation)
 - #62887 (Make the parser TokenStream more resilient after mismatched delimiter recovery)
 - #62921 (Add method disambiguation help for trait implementation)
 - #62930 (Add test for #51559)
 - #62942 (Use match ergonomics in Condvar documentation)
 - #62977 (Fix inconsistent highlight blocks.)
 - #62978 (Remove `cfg(bootstrap)` code for array implementations)
 - #62981 (Add note suggesting to borrow a String argument to find)

Failed merges:

 - #62964 (clarify and unify some type test names)

r? @ghost
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/sanity.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index dc65fb9b797..4e3930c8da7 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -78,8 +78,11 @@ pub fn check(build: &mut Build) {
 
     // We need cmake, but only if we're actually building LLVM or sanitizers.
     let building_llvm = build.hosts.iter()
-        .filter_map(|host| build.config.target_config.get(host))
-        .any(|config| config.llvm_config.is_none());
+        .map(|host| build.config.target_config
+            .get(host)
+            .map(|config| config.llvm_config.is_none())
+            .unwrap_or(true))
+        .any(|build_llvm_ourselves| build_llvm_ourselves);
     if building_llvm || build.config.sanitizers {
         cmd_finder.must_have("cmake");
     }
@@ -106,6 +109,14 @@ pub fn check(build: &mut Build) {
                 build.config.ninja = true;
             }
         }
+
+        if build.config.lldb_enabled {
+            cmd_finder.must_have("swig");
+            let out = output(Command::new("swig").arg("-version"));
+            if !out.contains("SWIG Version 3") && !out.contains("SWIG Version 4") {
+                panic!("Ensure that Swig 3.x.x or 4.x.x is installed.");
+            }
+        }
     }
 
     build.config.python = build.config.python.take().map(|p| cmd_finder.must_have(p))