Skip to content

Commit

Permalink
Add support for extracting zst LLVM distributions
Browse files Browse the repository at this point in the history
zstd is a lot faster than xz at decompressing.  Unfortunately,
llvm/clang aren't distributed with zstd, so this still takes action to
create a binary package, and then add it to _llvm_distributions.

Signed-off-by: Austin Schuh <austin.linux@gmail.com>
  • Loading branch information
AustinSchuh committed Jan 8, 2025
1 parent 361f5ab commit 419f9c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion toolchain/internal/llvm_distributions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,12 @@ def _distribution_urls(rctx):

sha256 = _llvm_distributions[basename]

strip_prefix = basename[:(len(basename) - len(".tar.xz"))]
if basename.endswith(".tar.xz"):
strip_prefix = basename[:(len(basename) - len(".tar.xz"))]
elif basename.endswith(".tar.zst"):
strip_prefix = basename[:(len(basename) - len(".tar.zst"))]
else:
fail("Unknown URL file extension {url}", url = basename)

strip_prefix = strip_prefix.rstrip("-rhel86")

Expand Down

0 comments on commit 419f9c6

Please sign in to comment.