Skip to content

Support Bazel 9#5505

Merged
smolkaj merged 1 commit intomainfrom
bazel9-support
Mar 1, 2026
Merged

Support Bazel 9#5505
smolkaj merged 1 commit intomainfrom
bazel9-support

Conversation

@smolkaj
Copy link
Member

@smolkaj smolkaj commented Feb 28, 2026

Motivation

This PR adds Bazel 9 support and fixes the build on macOS (without requiring a
full Xcode install).

Changes

  • .bazelversion: bump to 9.0.0
  • MODULE.bazel: update p4runtime to 1.5.0.bcr.1, which lifts the <9.0.0
    bazel_compatibility upper bound (Add p4runtime 1.5.0.bcr.1 bazelbuild/bazel-central-registry#7742)
  • .bazelrc / bazel/example/.bazelrc: add --repo_env=CC=/usr/bin/clang
    (use Command Line Tools clang, no full Xcode required) and
    --macos_minimum_os=10.15 (minimum for std::filesystem in libc++)

@smolkaj smolkaj force-pushed the bazel9-support branch 2 times, most recently from 485eaa0 to 27363c8 Compare February 28, 2026 18:16
@smolkaj smolkaj changed the base branch from main to hermetic-flex-bison February 28, 2026 18:18
Base automatically changed from hermetic-flex-bison to main February 28, 2026 18:47
Bazel 9 is now released. The only blocker is that BCR `p4runtime 1.5.0`
declares `bazel_compatibility < 9.0.0`. Suppress the check via
`--check_bazel_compatibility=off` until a new p4runtime BCR release is
cut (tracked in p4lang/p4runtime#597). Unlike `git_override`, this flag
works for modules published to the BCR.

Also add a Bazel version matrix to CI (7.x and 9.x), and fix macOS
builds: use Command Line Tools clang to avoid requiring a full Xcode
install, and set `macos_minimum_os=10.15` which is the minimum for
`std::filesystem` support in libc++.

Signed-off-by: Steffen Smolka <steffen.smolka@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smolkaj smolkaj marked this pull request as ready for review March 1, 2026 01:58
@smolkaj smolkaj enabled auto-merge March 1, 2026 01:58
@smolkaj
Copy link
Member Author

smolkaj commented Mar 1, 2026

@fruffy one more teeny tiny one 🙏

@smolkaj smolkaj requested a review from fruffy March 1, 2026 02:02
@fruffy fruffy added the infrastructure Topics related to code style and build and test infrastructure. label Mar 1, 2026
@smolkaj smolkaj added this pull request to the merge queue Mar 1, 2026
Merged via the queue into main with commit 3e3c1ea Mar 1, 2026
29 of 30 checks passed
@smolkaj smolkaj deleted the bazel9-support branch March 1, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Topics related to code style and build and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants