feat: fast_llvm_repo - #125
Open
AlexanderLanin wants to merge 1 commit into
Open
Conversation
AlexanderLanin
requested review from
antonkri,
dcalavrezo-qorix and
nradakovic
as code owners
August 21, 2026 14:01
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an optional Bazel repository rule for downloading and parallel-extracting pinned Linux LLVM distributions.
Changes:
- Adds
fast_llvm_repowith architecture/version selection and checksum verification. - Exposes the rule through the
rulespackage. - Documents usage, repository layout, and trade-offs.
Critical finding: Label() cannot resolve @toolchains_llvm from this module because it is not a direct dependency, causing the documented setup to fail.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Summary |
|---|---|
rules/fast_llvm_repo.bzl |
Implements LLVM download and extraction; contains the critical label-resolution issue. |
rules/BUILD |
Exports the repository rule. |
README.md |
Adds documentation links and feature summary. |
docs/repository_layout.md |
Documents the new rule location. |
docs/fast_llvm_repo.md |
Describes setup, behavior, and trade-offs. |
Suppressed comments (2)
docs/fast_llvm_repo.md:61
- This usage block never registers the generated toolchain, so a consumer following it will not select
@llvm_toolchain//:allunless it has an unrelated registration elsewhere. Addregister_toolchains("@llvm_toolchain//:all")afteruse_reposo the documented setup is complete.
use_repo(llvm, "llvm_toolchain")
rules/fast_llvm_repo.bzl:138
xz -Tonly provides multithreaded decompression with XZ Utils 5.4 or newer. On the olderxzversions still common on Linux, this command fails rather than extracting, while the presence check above accepts them. Check for a sufficiently recent version before downloading (or fall back toxz -dc) so the documented Linux support does not turn into a late repository-fetch failure.
"set -e; \"$1\" -T0 -dc \"$2\" | \"$3\" -xf - --strip-components=1 -C \"$4\"",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| _log("generating BUILD.bazel") | ||
| ctx.template( | ||
| "BUILD.bazel", | ||
| Label("@toolchains_llvm//toolchain:BUILD.llvm_repo.tpl"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.