Skip to content

CI: build Python bindings with Clang 21 on Ubuntu (was Clang 18)#6299

Open
Fedr wants to merge 1 commit into
masterfrom
ci/ubuntu-bindings-clang-21
Open

CI: build Python bindings with Clang 21 on Ubuntu (was Clang 18)#6299
Fedr wants to merge 1 commit into
masterfrom
ci/ubuntu-bindings-clang-21

Conversation

@Fedr

@Fedr Fedr commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Bump the Linux MRBind Clang version from 18 to 21 so the Ubuntu images (ubuntu22, ubuntu24) generate and build the Python bindings with Clang 21.

Changes

  • scripts/mrbind/clang_version.txt: 1821. This file is the single source of truth for the Linux bindings Clang — it's read by the Ubuntu Docker images (install_deps_ubuntu.sh installs clang-$VER via apt.llvm.org), the MRBind build (install_mrbind_ubuntu.sh), and bindings generation (generate.mk).
  • .github/workflows/config.yml: add scripts/mrbind/clang_version.txt to the linux-changes path filter. The bindings Clang is baked into the Ubuntu images at image-build time, so without this the prebuilt image would stay on Clang 18 and install_mrbind_ubuntu.sh would fail to find clang-21. Adding it forces an image rebuild whenever the version changes.

Scope / affected platforms

clang_version.txt is the Linux bindings Clang shared by the ubuntu22/ubuntu24 images (x64 + arm64) and the emscripten-c-bindings image used by generate-c-bindings, so the C bindings move to Clang 21 too (consistent — there is only one Linux bindings Clang version).

Unaffected, so disabled on this PR:

  • Windows — bindings use their own Clang (not clang_version.txt).
  • macOS — uses clang_version_macos.txt (already 22).
  • linux-vcpkg — builds bindings with the unversioned clang/clang++ (Clang 21) from its rockylinux image; cache key is the Dockerfile, not clang_version.txt.
  • emscripten (WASM build) — uses the emscripten image, which does not read clang_version.txt. The C-bindings path (emscripten-c-bindings image + generate-c-bindings) always runs regardless of this label, so the Clang 21 C-bindings generation is still exercised.

Clang 21 is already used elsewhere in CI (the rockylinux vcpkg images), confirming the toolchain is available.

Bump the Linux MRBind Clang version in `clang_version.txt` from 18 to 21,
so ubuntu22 and ubuntu24 generate and build the Python bindings with
Clang 21. This is the single source of truth read by the Ubuntu Docker
images (`install_deps_ubuntu.sh`), the MRBind build, and `generate.mk`.

Also add `scripts/mrbind/clang_version.txt` to the `linux-changes` path
filter in config.yml. The Ubuntu images bake in the bindings Clang at
image-build time, so without this the prebuilt image would stay on
Clang 18 and `install_mrbind_ubuntu.sh` would fail to find clang-21.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant