Skip to content

Commit

Permalink
Unrolled build for rust-lang#126399
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#126399 - onur-ozkan:126156, r=albertlarsan68

extend the check for LLVM build

We don't build LLVM when using the precompiled version from the CI builder.

Closes rust-lang#126156
  • Loading branch information
rust-timer authored Jun 14, 2024
2 parents 63491e1 + 58e3ac0 commit 4433ea3
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/bootstrap/src/core/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,20 @@ 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()
.map(|host| {
build.config.llvm_enabled(*host)
&& build
.config
.target_config
.get(host)
.map(|config| config.llvm_config.is_none())
.unwrap_or(true)
})
.any(|build_llvm_ourselves| build_llvm_ourselves);
let building_llvm = !build.config.llvm_from_ci
&& build
.hosts
.iter()
.map(|host| {
build.config.llvm_enabled(*host)
&& build
.config
.target_config
.get(host)
.map(|config| config.llvm_config.is_none())
.unwrap_or(true)
})
.any(|build_llvm_ourselves| build_llvm_ourselves);

let need_cmake = building_llvm || build.config.any_sanitizers_to_build();
if need_cmake && cmd_finder.maybe_have("cmake").is_none() {
Expand Down

0 comments on commit 4433ea3

Please sign in to comment.