sync llvm submodule during config parse

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2024-08-18 11:42:18 +03:00
parent 3d0f3b2096
commit 1ca2708e77

View File

@ -2730,19 +2730,23 @@ fn parse_download_ci_llvm(
asserts: bool, asserts: bool,
) -> bool { ) -> bool {
let if_unchanged = || { let if_unchanged = || {
// Git is needed to track modifications here, but tarball source is not available. if self.rust_info.is_from_tarball() {
// If not modified here or built through tarball source, we maintain consistency // Git is needed for running "if-unchanged" logic.
// with '"if available"'. println!(
if !self.rust_info.is_from_tarball() "WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`."
&& self );
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true) return false;
.is_none()
{
// there are some untracked changes in the given paths.
false
} else {
llvm::is_ci_llvm_available(self, asserts)
} }
self.update_submodule("src/llvm-project");
// Check for untracked changes in `src/llvm-project`.
let has_changes = self
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
.is_none();
// Return false if there are untracked changes, otherwise check if CI LLVM is available.
if has_changes { false } else { llvm::is_ci_llvm_available(self, asserts) }
}; };
match download_ci_llvm { match download_ci_llvm {