Skip to content

Commit 5840d87

Browse files
committed
in llvm::is_ci_llvm_modified, check if it's rust-lang/rust CI job
Signed-off-by: onur-ozkan <[email protected]>
1 parent 2d85139 commit 5840d87

File tree

1 file changed

+1
-11
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+1
-11
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool {
241241

242242
/// Returns true if we're running in CI with modified LLVM (and thus can't download it)
243243
pub(crate) fn is_ci_llvm_modified(config: &Config) -> bool {
244-
// If the LLVM submodule is unavailable (which is the case when `llvm.download-ci-llvm` is set to true),
245-
// LLVM cannot be modified which means it is unnecessary to run the git logic below.
246-
//
247-
// This is very unlikely to happen on our (rust-lang/rust) CI runners, as we intentionally fetch all
248-
// submodules in CI and most of the time (probably always) prefer `llvm.download-ci-llvm` to be set
249-
// to "if-unchanged" or true.
250-
if config.in_tree_llvm_info.is_managed_git_subrepository() {
251-
return false;
252-
}
253-
254-
CiEnv::is_ci() && {
244+
CiEnv::is_rust_lang_managed_ci_job() && config.rust_info.is_managed_git_subrepository() && {
255245
// We assume we have access to git, so it's okay to unconditionally pass
256246
// `true` here.
257247
let llvm_sha = detect_llvm_sha(config, true);

0 commit comments

Comments
 (0)