Skip to content

feat: fast_llvm_repo - #125

Open
AlexanderLanin wants to merge 1 commit into
mainfrom
fast_llvm
Open

feat: fast_llvm_repo#125
AlexanderLanin wants to merge 1 commit into
mainfrom
fast_llvm

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional Bazel repository rule for downloading and parallel-extracting pinned Linux LLVM distributions.

Changes:

  • Adds fast_llvm_repo with architecture/version selection and checksum verification.
  • Exposes the rule through the rules package.
  • 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//:all unless it has an unrelated registration elsewhere. Add register_toolchains("@llvm_toolchain//:all") after use_repo so the documented setup is complete.
use_repo(llvm, "llvm_toolchain")

rules/fast_llvm_repo.bzl:138

  • xz -T only provides multithreaded decompression with XZ Utils 5.4 or newer. On the older xz versions 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 to xz -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.

Comment thread rules/fast_llvm_repo.bzl
_log("generating BUILD.bazel")
ctx.template(
"BUILD.bazel",
Label("@toolchains_llvm//toolchain:BUILD.llvm_repo.tpl"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants