sync llvm submodule during config parse · rust-lang/rust@1ca2708 (original) (raw)
File tree
1 file changed
lines changed
- src/bootstrap/src/core/config
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2730,19 +2730,23 @@ impl Config { | ||
2730 | 2730 | asserts: bool, |
2731 | 2731 | ) -> bool { |
2732 | 2732 | let if_unchanged = | |
2733 | -// Git is needed to track modifications here, but tarball source is not available. | |
2734 | -// If not modified here or built through tarball source, we maintain consistency | |
2735 | -// with '"if available"'. | |
2736 | -if !self.rust_info.is_from_tarball() | |
2737 | - && self | |
2738 | -.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true) | |
2739 | -.is_none() | |
2740 | -{ | |
2741 | -// there are some untracked changes in the given paths. | |
2742 | -false | |
2743 | -} else { | |
2744 | - llvm::is_ci_llvm_available(self, asserts) | |
2733 | +if self.rust_info.is_from_tarball() { | |
2734 | +// Git is needed for running "if-unchanged" logic. | |
2735 | +println!( | |
2736 | +"WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`." | |
2737 | +); | |
2738 | +return false; | |
2745 | 2739 | } |
2740 | + | |
2741 | +self.update_submodule("src/llvm-project"); | |
2742 | + | |
2743 | +// Check for untracked changes in `src/llvm-project`. | |
2744 | +let has_changes = self | |
2745 | +.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true) | |
2746 | +.is_none(); | |
2747 | + | |
2748 | +// Return false if there are untracked changes, otherwise check if CI LLVM is available. | |
2749 | +if has_changes { false } else { llvm::is_ci_llvm_available(self, asserts) } | |
2746 | 2750 | }; |
2747 | 2751 | |
2748 | 2752 | match download_ci_llvm { |