Change information
Commit message:
cmd/racebuild: add support for applying a patch to LLVM
The root cause of https://go.dev/issue/78059 is a bug in LLVM, fixed
upstream in
https://github.com/llvm/llvm-project/commit/cdfdb06c9155080ec97d6e4f4dd90b6e7cefb0ca.
We would like to backport this fix to the race sysos in Go 1.25 and
1.26, but those sysos are built from an LLVM commit that is several
years ago. Jumping forward several years in a minor release is quite
risky. It is much better to apply the trivial fix to the existing
version of LLVM the sysos use.
Thus, this CL adds support to racebuild for applying a patch on top of
LLVM.
Ideally this would be a git cherry-pick, just like we do for Go.
Unfortunately LLVM is quite large. The repository is ~3.5GB plus another
~2.5GB to checkout HEAD. Some of our builders have limited disk space.
Thus racebuild already simply downloads the archive of the desired
revision, and unzips only the compiler-rt directory.
We can't use git cherry-pick in this scheme, so instead this CL adds
support for applying a raw patch file to the repo. Once the syso gets
built, the patch file is copied into the Go repo so it remains possible
to reproduce the syso builds.
For golang/go#78059.
Change-Id: Ifc1ebe22b2602e95f9de6bb64b0987a46a6a6964
Files:
- M cmd/racebuild/racebuild.go
Change size: M
Delta: 1 file changed, 99 insertions(+), 18 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Carlos Amedee
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI