diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-09-25 19:42:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-25 19:42:44 +0200 |
| commit | 61dc57c85a64bbc96226902136b8374df2c30ab6 (patch) | |
| tree | 81ae1c3e5c130aaea6f37e9936ab475238b0cd28 /src/bootstrap | |
| parent | 0a3cf02fd7c1d3c52ba2c4cd8d955e3fb091f651 (diff) | |
| parent | ef95430b9bb42fefa0a5e885525525bb52d9cb00 (diff) | |
| download | rust-61dc57c85a64bbc96226902136b8374df2c30ab6.tar.gz rust-61dc57c85a64bbc96226902136b8374df2c30ab6.zip | |
Rollup merge of #77126 - Mark-Simulacrum:llvm-less-often, r=alexcrichton
Invalidate local LLVM cache less often This avoids a download of LLVM after every rebase. The downside to this is that if we land some patch affecting LLVM built in CI that breaks this option, but that PR does not update the LLVM submodule, we'll likely not notice until the next update -- but this seems unlikely to happen in practice and I am not personally worried about it. r? @alexcrichton
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 1f0b55a7869..5c9184f4506 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -424,8 +424,19 @@ class RustBuild(object): rustfmt_stamp.write(self.date + self.rustfmt_channel) if self.downloading_llvm(): - llvm_sha = subprocess.check_output(["git", "log", "--author=bors", - "--format=%H", "-n1"]).decode(sys.getdefaultencoding()).strip() + # We want the most recent LLVM submodule update to avoid downloading + # LLVM more often than necessary. + # + # This git command finds that commit SHA, looking for bors-authored + # merges that modified src/llvm-project. + # + # This works even in a repository that has not yet initialized + # submodules. + llvm_sha = subprocess.check_output([ + "git", "log", "--author=bors", "--format=%H", "-n1", + "-m", "--first-parent", + "--", "src/llvm-project" + ]).decode(sys.getdefaultencoding()).strip() llvm_assertions = self.get_toml('assertions', 'llvm') == 'true' if self.program_out_of_date(self.llvm_stamp(), llvm_sha + str(llvm_assertions)): self._download_ci_llvm(llvm_sha, llvm_assertions) |
