diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-03-18 12:42:28 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-04-20 09:13:55 +0200 |
| commit | 1dabb76f40a4186a68d98bb3d04a3b089608c656 (patch) | |
| tree | f1838c194477d66a2075fe98f930d968643a3eb5 /src/bootstrap | |
| parent | 22280337f632a8f04b16a9d1edb40dac5b542513 (diff) | |
Explicitly model missing upstream
It shouldn't really happen, but if it does, at least we will have an explicit record of it.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/gcc.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/src/core/download.rs | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/gcc.rs b/src/bootstrap/src/core/build_steps/gcc.rs index 867874fc7cc..94abbb35ac5 100644 --- a/src/bootstrap/src/core/build_steps/gcc.rs +++ b/src/bootstrap/src/core/build_steps/gcc.rs @@ -129,6 +129,10 @@ fn try_download_gcc(builder: &Builder<'_>, target: TargetSelection) -> Option<Pa eprintln!("Found local GCC modifications, GCC will *not* be downloaded"); None } + PathFreshness::MissingUpstream => { + eprintln!("No upstream commit found, GCC will *not* be downloaded"); + None + } } } diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 1406ebeb621..a2d13cffbff 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -3210,6 +3210,10 @@ impl Config { upstream } + PathFreshness::MissingUpstream => { + eprintln!("No upstream commit found"); + return None; + } } } else { channel::read_commit_info_file(&self.src) @@ -3289,7 +3293,7 @@ impl Config { pub fn has_changes_from_upstream(&self, paths: &[&str]) -> bool { match self.check_modifications(paths) { PathFreshness::LastModifiedUpstream { .. } => false, - PathFreshness::HasLocalModifications { .. } => true, + PathFreshness::HasLocalModifications { .. } | PathFreshness::MissingUpstream => true, } } diff --git a/src/bootstrap/src/core/download.rs b/src/bootstrap/src/core/download.rs index 3c9cfead5a9..0051b874729 100644 --- a/src/bootstrap/src/core/download.rs +++ b/src/bootstrap/src/core/download.rs @@ -734,6 +734,10 @@ download-rustc = false match detect_llvm_freshness(self, self.rust_info.is_managed_git_subrepository()) { PathFreshness::LastModifiedUpstream { upstream } => upstream, PathFreshness::HasLocalModifications { upstream } => upstream, + PathFreshness::MissingUpstream => { + eprintln!("No upstream commit for downloading LLVM found"); + crate::exit!(1); + } }; let stamp_key = format!("{}{}", llvm_sha, self.llvm_assertions); let llvm_stamp = BuildStamp::new(&llvm_root).with_prefix("llvm").add_stamp(stamp_key); |
