diff options
| author | onur-ozkan <work@onurozkan.dev> | 2024-09-25 19:50:42 +0300 |
|---|---|---|
| committer | onur-ozkan <work@onurozkan.dev> | 2024-09-29 07:20:19 +0300 |
| commit | 5840d8791c1fc464e0aeca0690bff95274ddacd7 (patch) | |
| tree | fb2d1827c5fa65db68b1017111ec54aa6e1632ba | |
| parent | 2d85139f87f52f28172be61c2957d8f856b3d9ac (diff) | |
| download | rust-5840d8791c1fc464e0aeca0690bff95274ddacd7.tar.gz rust-5840d8791c1fc464e0aeca0690bff95274ddacd7.zip | |
in `llvm::is_ci_llvm_modified`, check if it's rust-lang/rust CI job
Signed-off-by: onur-ozkan <work@onurozkan.dev>
| -rw-r--r-- | src/bootstrap/src/core/build_steps/llvm.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 81a48000cf1..400297316bb 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -241,17 +241,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool { /// Returns true if we're running in CI with modified LLVM (and thus can't download it) pub(crate) fn is_ci_llvm_modified(config: &Config) -> bool { - // If the LLVM submodule is unavailable (which is the case when `llvm.download-ci-llvm` is set to true), - // LLVM cannot be modified which means it is unnecessary to run the git logic below. - // - // This is very unlikely to happen on our (rust-lang/rust) CI runners, as we intentionally fetch all - // submodules in CI and most of the time (probably always) prefer `llvm.download-ci-llvm` to be set - // to "if-unchanged" or true. - if config.in_tree_llvm_info.is_managed_git_subrepository() { - return false; - } - - CiEnv::is_ci() && { + CiEnv::is_rust_lang_managed_ci_job() && config.rust_info.is_managed_git_subrepository() && { // We assume we have access to git, so it's okay to unconditionally pass // `true` here. let llvm_sha = detect_llvm_sha(config, true); |
