Copybara import of the project: - #1872
Open
copybara-service[bot] wants to merge 1 commit into
Open
Conversation
copybara-service
Bot
force-pushed
the
test_970602651
branch
3 times, most recently
from
August 25, 2026 23:43
0956f3e to
49144e8
Compare
-- f303d03 by Lukasz Anforowicz <lukasza@google.com>: Bazel build of `rs_bindings_from_cc:cc_ir`. The primary change and the goal of this commit is enabling building of the `cc_ir` target and covering this target via GitHub CI/CQ (see the one line change in `rust.yml`). This primary change is supported by teaching Bazel how to build LLVM/Clang from sources: - Migrating LLVM dependency to Bzlmod and replacing the old WORKSPACE-based loader with a new module extension (`llvm_extension.bzl`) that downloads LLVM source and configures host dependencies (`zlib`, `libxml2`, `zstd`). - Using Clang/LLVM dependency locked to a specific Git commit hash specified in `MODULE.bazel`: `llvm_ext.configure(commit = "...")`. - We use Renovate (via `.github/renovate.json`) to automate rolls - it will open a PR to update the commit hash as/when needed. - Note that `MODULE.bazel` asks for Clang/LLVM `22.1.0` to be used as a compiler (i.e. the `llvm_ext.configure` compiler is **not** used during Bazel builds - it only becomes part of the `rs_bindings_from_cc` tool). - The Clang/LLVM dependency needs to be patched to account for unsupported platforms. This kind of patching mimics how other OSS projects work with Clang/LLVM: - https://github.com/google/xls/blob/64bf93a3963dc6fd55b749e457e3345c91a5091f/dependency_support/llvm/platforms_config.patch - https://github.com/carbon-language/carbon-lang/blob/f58de06c0dbd506573620d8f2873923a8697c925/bazel/llvm_project/0011_Temporarily_remove_reference_to_hermetic_toolchain.patch FUTURE_COPYBARA_INTEGRATE_REVIEW=#1757 from anforowicz:clang-dependency f303d03 PiperOrigin-RevId: 970602651
copybara-service
Bot
force-pushed
the
test_970602651
branch
from
August 25, 2026 23:54
49144e8 to
5d08d1e
Compare
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.
Copybara import of the project:
--
f303d03 by Lukasz Anforowicz lukasza@google.com:
Bazel build of
rs_bindings_from_cc:cc_ir.The primary change and the goal of this commit is enabling building of
the
cc_irtarget and covering this target via GitHub CI/CQ (see theone line change in
rust.yml). This primary change is supported byteaching Bazel how to build LLVM/Clang from sources:
WORKSPACE-based loader with a new module extension
(
llvm_extension.bzl) that downloads LLVM source and configureshost dependencies (
zlib,libxml2,zstd).specified in
MODULE.bazel:llvm_ext.configure(commit = "...")..github/renovate.json) to automate rolls -it will open a PR to update the commit hash as/when needed.
MODULE.bazelasks for Clang/LLVM22.1.0to be usedas a compiler (i.e. the
llvm_ext.configurecompiler is notused during Bazel builds - it only becomes part of the
rs_bindings_from_cctool).unsupported platforms. This kind of patching mimics how other OSS
projects work with Clang/LLVM:
FUTURE_COPYBARA_INTEGRATE_REVIEW=#1757 from anforowicz:clang-dependency f303d03