diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-06-07 15:21:02 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-07 15:21:02 +0900 |
| commit | 7d07cfbbe7af709b7f1e8be856a9d5efd6d816e7 (patch) | |
| tree | 4efa29e7cf8df09a2ec0df76e3fd748d49d32244 | |
| parent | 7fcfe0568042467c57129a3a82d42e09719c439c (diff) | |
| parent | 261d16a367b05dbc1fcfb31d85f69997853b37c8 (diff) | |
Rollup merge of #85996 - jyn514:library-changes, r=Mark-Simulacrum
rustbuild: take changes to the standard library into account for `download-rustc` Previously, changing the standard library with `download-rustc = "if-unchanged"` would incorrectly reuse the cached compiler and standard library from CI, which was confusing and led to incorrect test failures or successes. r? `@Mark-Simulacrum`
| -rw-r--r-- | src/bootstrap/bootstrap.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 149a899cef7..7c7f162b82c 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -648,18 +648,20 @@ class RustBuild(object): rev_parse = ["git", "rev-parse", "--show-toplevel"] top_level = subprocess.check_output(rev_parse, universal_newlines=True).strip() compiler = "{}/compiler/".format(top_level) + library = "{}/library/".format(top_level) # Look for a version to compare to based on the current commit. # Only commits merged by bors will have CI artifacts. merge_base = ["git", "log", "--author=bors", "--pretty=%H", "-n1"] commit = subprocess.check_output(merge_base, universal_newlines=True).strip() - # Warn if there were changes to the compiler since the ancestor commit. - status = subprocess.call(["git", "diff-index", "--quiet", commit, "--", compiler]) + # Warn if there were changes to the compiler or standard library since the ancestor commit. + status = subprocess.call(["git", "diff-index", "--quiet", commit, "--", compiler, library]) if status != 0: if download_rustc == "if-unchanged": return None - print("warning: `download-rustc` is enabled, but there are changes to compiler/") + print("warning: `download-rustc` is enabled, but there are changes to \ + compiler/ or library/") if self.verbose: print("using downloaded stage1 artifacts from CI (commit {})".format(commit)) |
