Skip to content

Commit a5fdf36

Browse files
committed
bootstrap: don't install llvm-tools when it's externally provided
fixes #109194
1 parent 11268dc commit a5fdf36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bootstrap/install.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ install!((self, builder, _config),
209209
);
210210
}
211211
};
212-
LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
212+
LlvmTools, alias = "llvm-tools", should_build_llvm(_config), only_hosts: true, {
213213
let tarball = builder
214214
.ensure(dist::LlvmTools { target: self.target })
215215
.expect("missing llvm-tools");
@@ -251,6 +251,11 @@ install!((self, builder, _config),
251251
};
252252
);
253253

254+
fn should_build_llvm(config: &Config) -> bool {
255+
// additionaly check that llvm is not externally provided
256+
LlvmTools::should_build(config) && config.is_rust_llvm(config.build)
257+
}
258+
254259
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
255260
pub struct Src {
256261
pub stage: u32,

0 commit comments

Comments
 (0)