Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

Add an experimental Bazel build - #212

Merged
aaronj0 merged 3 commits into
compiler-research:masterfrom
conrade-ctc:bazel-build-upstream
Jul 3, 2026
Merged

Add an experimental Bazel build#212
aaronj0 merged 3 commits into
compiler-research:masterfrom
conrade-ctc:bazel-build-upstream

Conversation

@conrade-ctc

Copy link
Copy Markdown

Adds an experimental, best-effort Bazel build alongside the supported build. Builds the cppyy-backend C++ library/solib against a local LLVM/Clang tree, consuming the shared cppyy_bazel module from the sibling cppyy repo (local_path_override(... path = "../cppyy/bazel")).

Not gated in CI; the existing build remains supported. Needs a local LLVM tree via LLVM_DIR (not built by Bazel).

Part of a set of 4 coordinated PRs across the cppyy stack — check out cppyy alongside this repo and review it after cppyy (which provides cppyy_bazel).

Testing

Builds the backend solib and links into the full cppyy stack, whose 23 Bazel test targets pass end-to-end.

@conrade-ctc
conrade-ctc force-pushed the bazel-build-upstream branch 3 times, most recently from ba5d5bc to 754518f Compare June 19, 2026 15:03
Add a standalone Bazel build alongside CMake (best-effort; CMake remains the
supported build). Builds libcppyy-backend.so and the Python package against the
shared cppyy_bazel module and @cppinterop.

- MODULE.bazel wires cppyy_bazel + cppinterop; opts in to the centralized clang
  toolchain
- BUILD.bazel: clingwrapper cc_library/solib (exceptions+rtti re-enabled) and
  the py_library; py_wheel packaging
- best-effort, non-gating GitHub Actions workflow + README section

Co-developed-with-the-help-of: Claude Code (Claude Opus 4.8)
@conrade-ctc
conrade-ctc force-pushed the bazel-build-upstream branch from 754518f to fe81d2a Compare June 19, 2026 15:13
Comment thread .github/workflows/bazel.yml Outdated
Comment on lines +36 to +40
FORK_OWNER="conrade-ctc" # TODO: compiler-research after infra merges
FORK_BRANCH="bazel-build-upstream" # TODO: default branch after infra merges
cd "$GITHUB_WORKSPACE/.."
for repo in cppyy CppInterOp; do
git clone --depth=1 -b "$FORK_BRANCH" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since the CppInterOp PR is in, can we update this to no longer clone the fork?

@conrade-ctc conrade-ctc Jun 26, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

right, I'll update all PRs... whatever order they end up merging in, i'll just keep updating appropriately, then a final clean up PR may be needed depending on the order they merged :) I think if we do cppy first, that cleans with this one all the way, but CppInterOp will need another cleanup...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What is your preferred order of merging? I see we still point to the forks on the CppInterOp patch, so I'm not sure what the easiest way to test this is

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

What is your preferred order of merging? I see we still point to the forks on the CppInterOp patch, so I'm not sure what the easiest way to test this is

Actually, best is that i update all the PRs to ref head since its best-effort, and we already know it works. I'll open another for CppInterOp to get it back to head, then you can merge in any order. I'll hit this later today when i'm back at desk.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

this is now done

… merged

CppInterOp #1039 merged the Bazel build to compiler-research/main, so the
sibling clone no longer needs the conrade-ctc fork for it. Pull CppInterOp from
compiler-research/main; the rest of the stack still comes from the fork until
those PRs merge.

Co-developed-with-the-help-of: Claude Code (Claude Opus 4.8)
Drop the conrade-ctc fork-branch checkout for the sibling repos. The job stays
best-effort/non-gating and may fail until all four Bazel PRs land on the
default branches, at which point it goes green on its own — no follow-up PR
needed to unwind the fork coupling.

Co-developed-with-the-help-of: Claude Code (Claude Opus 4.8)
@conrade-ctc

Copy link
Copy Markdown
Author

@aaronj0 All four Bazel PRs are ready for merge — CPyCppyy #209, cppyy-backend #212, cppyy #229, and CppInterOp #1042. Each now clones its siblings from the compiler-research default branches (no fork coupling), and the jobs are best-effort / non-gating, so they can be merged in any order: the final state is what matters, and the jobs go green on their own once all four land. No follow-up PRs needed to unwind anything.

@conrade-ctc

Copy link
Copy Markdown
Author

Hi @aaronj0 — the requested change is done: sibling repos are now cloned from the compiler-research defaults (not the fork). Happy to merge whenever you're ready to re-approve!

@aaronj0 aaronj0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@aaronj0
aaronj0 merged commit 95c06e2 into compiler-research:master Jul 3, 2026
23 of 25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants