Skip to content

Commit aef6848

Browse files
authored
Rollup merge of #85423 - jyn514:cmake, r=Mark-Simulacrum
Don't require cmake on Windows when LLVM isn't being built Previously, setting `download-ci-llvm = true` when cmake wasn't installed would give the following error: ``` failed to execute command: "cmake" "--help" error: The system cannot find the file specified. (os error 2) ```
2 parents 6e05a71 + 28c9c04 commit aef6848

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bootstrap/sanity.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ pub fn check(build: &mut Build) {
9393
.unwrap_or(true)
9494
})
9595
.any(|build_llvm_ourselves| build_llvm_ourselves);
96-
if building_llvm || build.config.any_sanitizers_enabled() {
96+
let need_cmake = building_llvm || build.config.any_sanitizers_enabled();
97+
if need_cmake {
9798
cmd_finder.must_have("cmake");
9899
}
99100

@@ -204,7 +205,7 @@ pub fn check(build: &mut Build) {
204205
}
205206
}
206207

207-
if target.contains("msvc") {
208+
if need_cmake && target.contains("msvc") {
208209
// There are three builds of cmake on windows: MSVC, MinGW, and
209210
// Cygwin. The Cygwin build does not have generators for Visual
210211
// Studio, so detect that here and error.

0 commit comments

Comments
 (0)