[bazel] Update to v5.2.0
The primary change we are looking for is "Add support for .ar archives (and .deb files) https://github.com/bazelbuild/bazel/pull/15218" https://blog.bazel.build/2022/06/08/bazel-5.2.html In theory, we should be able to trigger Linux RBE compilations (e.g. IWYU) from Mac with this change. Change-Id: I217406d21fd55507e090c4bb5f79c796230717e6 Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549659 Reviewed-by: Joe Gregorio <jcgregorio@google.com>
This commit is contained in:
parent
707fc031f1
commit
fb13c18ddf
@ -1 +1 @@
|
||||
5.0.0
|
||||
5.2.0
|
||||
|
@ -150,21 +150,15 @@ debs_to_install = [
|
||||
def _download_and_extract_deb(ctx, deb, sha256, prefix, output = ""):
|
||||
"""Downloads a debian file and extracts the data into the provided output directory"""
|
||||
|
||||
# https://bazel.build/rules/lib/repository_ctx#download
|
||||
# .deb files are also .ar archives.
|
||||
ctx.download(
|
||||
# https://bazel.build/rules/lib/repository_ctx#download_and_extract
|
||||
# A .deb file has a data.tar.xz and a control.tar.xz, but the important contents
|
||||
# (i.e. the headers or libs) are in the data.tar.xz
|
||||
ctx.download_and_extract(
|
||||
url = _mirror([deb, mirror_prefix + sha256 + ".deb"]),
|
||||
output = "tmp/deb.ar",
|
||||
output = "tmp",
|
||||
sha256 = sha256,
|
||||
)
|
||||
|
||||
# https://bazel.build/rules/lib/repository_ctx#execute
|
||||
# This uses the statically built binary from the infra repo
|
||||
res = ctx.execute(["bin/open_ar", "--input", "tmp/deb.ar", "--output_dir", "tmp"], quiet = False)
|
||||
if res.return_code != 0:
|
||||
# Run it again to display the error
|
||||
fail("Could not open deb.ar from " + deb)
|
||||
|
||||
# https://bazel.build/rules/lib/repository_ctx#extract
|
||||
ctx.extract(
|
||||
archive = "tmp/data.tar.xz",
|
||||
@ -176,16 +170,6 @@ def _download_and_extract_deb(ctx, deb, sha256, prefix, output = ""):
|
||||
ctx.delete("tmp")
|
||||
|
||||
def _download_linux_amd64_toolchain_impl(ctx):
|
||||
# Workaround for Bazel not yet supporting .ar files
|
||||
# See https://skia-review.googlesource.com/c/buildbot/+/524764
|
||||
# https://bazel.build/rules/lib/repository_ctx#download
|
||||
ctx.download(
|
||||
url = mirror_prefix + "open_ar_v1",
|
||||
sha256 = "55bb74d9ce5d6fa06e390b2319a410ec595dbb591a3ce650da356efe970f86d3",
|
||||
executable = True,
|
||||
output = "bin/open_ar",
|
||||
)
|
||||
|
||||
# Download the clang toolchain (the extraction can take a while)
|
||||
# https://bazel.build/rules/lib/repository_ctx#download_and_extract
|
||||
ctx.download_and_extract(
|
||||
|
Loading…
Reference in New Issue
Block a user