Repository navigation
bazel: take sv-elab from the BCR, turn exact version pins into floors - #12112
Conversation
The BCR now carries sv-elab 2026-10-29, six commits past the third-party/sv-elab submodule's 3e152133 (slang 12.1, fixed operand evaluation order, blackbox localparams). README's third-party rule puts a BCR module first and keeps submodules for real forks, so the submodule and its local_path_override go, and a plain bazel_dep replaces them. That also helps every module that depends on openroad: a local_path_override is ignored outside the root module, so a consumer had to write its own override for sv-elab and keep it on the submodule's commit by hand. sv-elab raises the floors on flex and readline, which moves bison to 3.8.2.bcr.13, and that needs rules_cc_autoconf 0.32.0 or later. The exact pins held for the gnulib/hermetic-llvm fixes no longer agree with each other, so they become what they were meant to be, floors: - rules_cc_autoconf, m4: the graph alone resolves above the pinned version (0.34.0, 1.4.21.bcr.8), so the pins go. - sed: no longer in the graph at all; the override did nothing. - gawk: the graph alone resolves 5.3.2.bcr.3, below the fix, so it becomes a direct bazel_dep at 5.4.0.bcr.2, as freetype already is, which also reaches downstream consumers. The bazel-lock and web-bundle workflows checked out submodules only because module resolution needed this one, so they no longer do. .bazelignore keeps third-party/sv-elab/ among the former submodules that git leaves behind in existing checkouts. Tested: bazel test //src/syn/... //:openroad (16/16 pass) and bazel build --nobuild //..., in a checkout without third-party/sv-elab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PFLaEsHEYMYe38QpoJAPo Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
There was a problem hiding this comment.
Code Review
This pull request removes the third-party/sv-elab git submodule and transitions the sv-elab dependency to a standard Bazel module dependency (bazel_dep) retrieved from the Bazel Central Registry (BCR). It cleans up related overrides in MODULE.bazel (such as rules_cc_autoconf, m4, and sed), updates .bazelignore and .gitmodules, updates the lockfile, and updates comments in elab_diag_test.cc to reflect this change. There are no review comments, and I have no feedback to provide.
|
@hzeller @maliberty Trying to get one more git submodule rock in my shoe out... 🤞 |
This comment was marked as outdated.
This comment was marked as outdated.
|
pr-merge is green, so good to go. pr-head doesnt matter |
|
We just made this same change internally. |
|
Deleting the sv-elab submodule makes CI more reliable and the module more idiomatic:
|
80a6c68
into
The-OpenROAD-Project:master
Makes OpenROAD more idiomatic as a Bazel module and easier to depend
on from other Bazel modules: one submodule fewer, and version floors
that reach the modules that depend on
openroad.sv-elab from the BCR; its submodule is deleted
The BCR now carries sv-elab 2026-10-29, six commits past the
third-party/sv-elabsubmodule's3e152133(slang 12.1, fixed operandevaluation order, localparams on blackboxes ignored for export).
The README's third-party rule puts a BCR module first and keeps
submodules for real forks, so a plain
bazel_depreplaces thelocal_path_override, and the submodule is deleted.Bazel honours
local_path_overrideonly in the root module. Amodule that depends on
openroadtherefore resolvedsv-elabto aversion that does not exist on the BCR, unless it wrote its own
override and kept that on the submodule's commit by hand. With a
plain
bazel_dep, it resolves with nothing to copy.If you would rather delete the submodule in a follow-up PR, this
splits cleanly: Bazel no longer reads
third-party/sv-elab, and.bazelignorealready keeps it out of//....Exact pins become floors
The new sv-elab raises the floors on flex and readline. That moves
bison to 3.8.2.bcr.13, which needs
rules_cc_autoconf0.32.0 orlater, and the exact
single_version_overridepins kept for thegnulib/hermetic-llvm fixes no longer agree with each other. They were
minimum versions written as exact pins, so this writes them as
minimums:
rules_cc_autoconfm4sedgawkbazel_dep5.4.0.bcr.2A
single_version_overridealso applies only in the root module, soa module depending on
openroadnever got these fixes. Thegawkfloor is now a direct
bazel_dep, asfreetypealready is, sominimum version selection carries it to them too.
Smaller
only because module resolution needed sv-elab; they no longer do.
.bazelignorekeepsthird-party/sv-elab/among the formersubmodules that git leaves on disk in existing checkouts and
reused runners, as for
third-party/abc/.elab_diag_test.ccthat named the submodule path.Testing
In a checkout without
third-party/sv-elab:bazel test //src/syn/... //:openroad: 16/16 passbazel build --nobuild //...: analysis cleanbazel mod deps --lockfile_mode=update: no warnings; lockfileincluded
The remaining submodule
src/stastays. OpenSTA is OpenROAD's own fork and is not on theBCR, so it fits the README's rule. GitHub's
/archive/<sha>.tar.gzleaves submodules out, though, so a module that depends on
openroadthrough an
archive_overridestill has to fetch OpenSTA intosrc/staitself. Publishing OpenSTA as a Bazel module would removethat last submodule, and is a separate discussion.
🤖 Generated with Claude Code
https://claude.ai/code/session_018PFLaEsHEYMYe38QpoJAPo