diff --git a/toolchain/internal/llvm_distributions.bzl b/toolchain/internal/llvm_distributions.bzl index 47b879ef..1ce15061 100644 --- a/toolchain/internal/llvm_distributions.bzl +++ b/toolchain/internal/llvm_distributions.bzl @@ -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")