extend the check for LLVM build · rust-lang/rust@58e3ac0 (original) (raw)

Original file line number Diff line number Diff line change
@@ -137,19 +137,20 @@ pub fn check(build: &mut Build) {
137 137 }
138 138
139 139 // We need cmake, but only if we're actually building LLVM or sanitizers.
140 -let building_llvm = build
141 -.hosts
142 -.iter()
143 -.map(|host
144 - build.config.llvm_enabled(*host)
145 - && build
146 -.config
147 -.target_config
148 -.get(host)
149 -.map(|config
150 -.unwrap_or(true)
151 -})
152 -.any(|build_llvm_ourselves
140 +let building_llvm = !build.config.llvm_from_ci
141 + && build
142 +.hosts
143 +.iter()
144 +.map(|host
145 + build.config.llvm_enabled(*host)
146 + && build
147 +.config
148 +.target_config
149 +.get(host)
150 +.map(|config
151 +.unwrap_or(true)
152 +})
153 +.any(|build_llvm_ourselves
153 154
154 155 let need_cmake = building_llvm |
155 156 if need_cmake && cmd_finder.maybe_have("cmake").is_none() {