Skip to content

Commit

Permalink
Fix building_llvm in sanity check, add swig sanity check.
Browse files Browse the repository at this point in the history
  • Loading branch information
golddranks committed Jul 23, 2019
1 parent e649e90 commit f78cd4d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand All @@ -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))
Expand Down

0 comments on commit f78cd4d

Please sign in to comment.