Skip to content

Copybara import of the project: - #1872

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_970602651
Open

Copybara import of the project:#1872
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_970602651

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 25, 2026

Copy link
Copy Markdown

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_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:

FUTURE_COPYBARA_INTEGRATE_REVIEW=#1757 from anforowicz:clang-dependency f303d03

@copybara-service
copybara-service Bot force-pushed the test_970602651 branch 3 times, most recently from 0956f3e to 49144e8 Compare August 25, 2026 23:43
--
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant