in llvm::is_ci_llvm_modified
, check if it's rust-lang/rust CI job
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
2d85139f87
commit
5840d8791c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user