Skip to content

Commit

Permalink
Add support for extracting zst LLVM distributions (#433)
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 <[email protected]>
  • Loading branch information
AustinSchuh authored Jan 9, 2025
1 parent a2452f1 commit d834d83
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 d834d83

Please sign in to comment.