Skip to content

Migrate to Bazel 9#10845

Draft
maliberty wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:bazel-9-migration
Draft

Migrate to Bazel 9#10845
maliberty wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:bazel-9-migration

Conversation

@maliberty

Copy link
Copy Markdown
Member

Bazel 9 removes several long-deprecated globals and native rules (CcInfo, cc_test, cc_library/cc_binary, sh_binary). Update or pin the dependencies whose .bzl/BUILD files still used the removed forms:

  • rules_go: force 0.61.1. The MVS-selected 0.53.0 (transitive via or-tools, gazelle, grpc-java, aspect_rules_lint -> rules_buf) referenced the removed CcInfo global in cgo.bzl; 0.59.0+ loads it from @rules_cc.
  • spdlog: 1.15.1 -> 1.17.0. Its BUILD.bazel used the native cc_test.
  • scip: 9.2.3 -> 9.2.3.bcr.1. The overlay used native cc_library/ cc_binary; .bcr.1 loads them from @rules_cc (same source, so the tinycthread patch still applies).
  • freetype: 2.13.3 -> 2.13.3.bcr.2 (transitive via qt-bazel ->
    harfbuzz). The overlay used native cc_library; .bcr.2 loads it from @rules_cc (same 2.13.3 source).
  • bazel-orfs: bump to 551d4c7. Its generated mock_klayout BUILD loads sh_binary from @rules_shell, and its generated gnumake BUILD overlay loads cc_binary from @rules_cc -- both native rules Bazel 9 removed (upstream PRs TR conn fix #759 and TritonCTS runTritonCTS segment failed in gtest #761).

@maliberty maliberty self-assigned this Jul 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the Bazel version from 8.6.0 to 9.1.1. To ensure compatibility with Bazel 9, which removed native C++ rules, several dependencies in MODULE.bazel have been updated or overridden to use versions that load these rules from @rules_cc. Specifically, rules_go is updated to 0.61.1, freetype is overridden to 2.13.3.bcr.2, spdlog is updated to 1.17.0, and scip is updated to 9.2.3.bcr.1. Additionally, the BAZEL_ORFS_COMMIT has been updated. There are no review comments, so I have no feedback to provide.

@maliberty

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 090f82fbcf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Bazel 9 removes several long-deprecated globals and native rules
(CcInfo, cc_test, cc_library/cc_binary, sh_binary). Update or pin the
dependencies whose .bzl/BUILD files still used the removed forms:

- rules_go: force 0.61.1. The MVS-selected 0.53.0 (transitive via
  or-tools, gazelle, grpc-java, aspect_rules_lint -> rules_buf)
  referenced the removed CcInfo global in cgo.bzl; 0.59.0+ loads it
  from @rules_cc.
- spdlog: 1.15.1 -> 1.17.0. Its BUILD.bazel used the native cc_test.
- scip: 9.2.3 -> 9.2.3.bcr.1. The overlay used native cc_library/
  cc_binary; .bcr.1 loads them from @rules_cc (same source, so the
  tinycthread patch still applies).
- freetype: 2.13.3 -> 2.13.3.bcr.2 (transitive via qt-bazel ->
  harfbuzz). The overlay used native cc_library; .bcr.2 loads it from
  @rules_cc (same 2.13.3 source).
- bazel-orfs: bump to 551d4c7. Its generated mock_klayout BUILD loads
  sh_binary from @rules_shell, and its generated gnumake BUILD overlay
  loads cc_binary from @rules_cc -- both native rules Bazel 9 removed
  (upstream PRs The-OpenROAD-Project#759 and The-OpenROAD-Project#761).

Also suppress -Wc++11-narrowing in third-party/mockturtle's emap test:
its vendored headers narrow ints in braced initializer lists, which
clang treats as an error by default.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant