Skip to content

Commit 80a6c68

Browse files
oharboeclaude
andauthored
bazel: take sv-elab from the BCR, turn exact version pins into floors (#12112)
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. Claude-Session: https://claude.ai/code/session_018PFLaEsHEYMYe38QpoJAPo Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 0bcaab7 commit 80a6c68

8 files changed

Lines changed: 48 additions & 73 deletions

File tree

‎.bazelignore‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ src/sta/debug/
88
# existing checkouts and reused CI runners; Bazel takes these from MODULE.bazel.
99
third-party/abc/
1010
third-party/lemon/
11+
third-party/sv-elab/
1112

1213
# standalone workspace for downstream consumer tests
1314
test/downstream/
1415

15-
# Prevent //... from walking into sv-elab as its BUILD files expect
16-
# sv-elab is the root
17-
third-party/sv-elab/
18-
1916
# Other things to ignore
2017
tmp/

‎.github/workflows/github-actions-are-web-bundles-generated.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ jobs:
3131
steps:
3232
- name: Check out repository code
3333
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34-
with:
35-
# MODULE.bazel overrides sv-elab to the third-party/sv-elab
36-
# submodule, so module resolution needs it checked out.
37-
submodules: recursive
3834
- name: Set up bazel
3935
# Self-hosted runners do not preinstall bazelisk; the clang-tidy
4036
# workflow sets it up the same way.

‎.github/workflows/github-actions-check-bazel-lock.yml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ jobs:
1111
steps:
1212
- name: Check out repository code
1313
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
14-
with:
15-
# MODULE.bazel overrides sv-elab to the third-party/sv-elab
16-
# submodule, so module resolution needs it checked out.
17-
submodules: 'recursive'
1814

1915
- name: Set up bazel
2016
uses: bazel-contrib/setup-bazel@104e3eea9447cdaa4b00d0fb46191a3985d26ab3 # 0.19.1

‎.gitmodules‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "module/OpenSTA"]
22
path = src/sta
33
url = ../../The-OpenROAD-Project/OpenSTA.git
4-
[submodule "third-party/sv-elab"]
5-
path = third-party/sv-elab
6-
url = ../../povik/sv-elab.git

‎MODULE.bazel‎

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ bazel_dep(name = "rules_license", version = "1.0.0")
5151
bazel_dep(name = "rules_shell", version = "0.6.1")
5252
bazel_dep(name = "swig", version = "4.3.0.bcr.2")
5353

54-
# rules_cc_autoconf is transitive (bison, flex, m4, gawk, readline). Its
55-
# checker uses std::back_inserter without <iterator>, which libc++ 23 no
56-
# longer pulls in transitively; 0.23.0 adds the include.
57-
single_version_override(
58-
module_name = "rules_cc_autoconf",
59-
version = "0.23.0",
60-
)
61-
6254
BOOST_VERSION = "1.89.0.bcr.2"
6355

6456
BOOST_CONTEXT_VERSION = "1.89.0.bcr.3"
@@ -149,14 +141,13 @@ single_version_override(
149141
version = "76.1.bcr.3",
150142
)
151143

152-
# gawk is transitive (abc -> ncurses -> gawk; yosys -> gawk). Same gnulib
153-
# libc-header shadowing as sed: gawk@5.3.2.bcr.2 fails to compile against
154-
# hermetic-llvm's explicit libc -isystem entries.
155-
single_version_override(
156-
module_name = "gawk",
157-
version = "5.4.0.bcr.2",
158-
)
159-
144+
# gawk is transitive (abc -> ncurses -> gawk). Its vendored gnulib headers
145+
# shadow libc headers, and gawk@5.3.2.bcr.2 fails to compile against
146+
# hermetic-llvm's explicit libc -isystem entries (BCR #7642); the graph
147+
# alone resolves 5.3.2.bcr.3. A direct bazel_dep rather than a
148+
# single_version_override, so the floor reaches downstream consumers via
149+
# MVS too (overrides only apply in the root module).
150+
bazel_dep(name = "gawk", version = "5.4.0.bcr.2")
160151
bazel_dep(name = "git", version = "2.54.0")
161152

162153
# We enable the external_include_paths feature globally (see .bazelrc), which
@@ -174,31 +165,18 @@ single_version_override(
174165
)
175166

176167
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
177-
178-
# m4 is transitive (bison/rules_flex -> m4). Same gnulib libc-header
179-
# shadowing class as sed/gawk under hermetic-llvm (BCR #7642).
180-
single_version_override(
181-
module_name = "m4",
182-
version = "1.4.21.bcr.4",
183-
)
184-
185168
bazel_dep(name = "libdeflate", version = "1.26")
186169
bazel_dep(name = "openmp", version = "21.1.5.bcr.2")
187170
bazel_dep(name = "or-tools", version = "9.15")
188171

189-
# sed is transitive (abc -> ncurses -> sed). Its vendored gnulib headers
190-
# deliberately shadow libc headers (stdio.h, error.h); hermetic-llvm's
191-
# explicit libc -isystem entries outrank them and sed@4.9.bcr.3 fails to
192-
# compile (BCR #7642). 4.9.bcr.5 carries the upstream fix (BCR #7915).
193-
single_version_override(
194-
module_name = "sed",
195-
version = "4.9.bcr.5",
196-
)
197-
198172
# spdlog < 1.16.0.bcr.2's BUILD.bazel calls the native cc_test rule, which
199173
# Bazel 9 removed; loading the package fails. 1.16.0.bcr.2+ loads cc_test
200174
# from @rules_cc.
201175
bazel_dep(name = "spdlog", version = "1.17.0")
176+
177+
# sv-elab: the SystemVerilog frontend whose sources src/syn/src/elab
178+
# compiles, from the BCR like every dependency that is not a fork.
179+
bazel_dep(name = "sv-elab", version = "2026-10-29")
202180
bazel_dep(name = "tcl_lang", version = "9.0.2.bcr.2")
203181
bazel_dep(name = "tcmalloc", version = "0.0.0-20250927-12f2552")
204182
bazel_dep(name = "yaml-cpp", version = "0.9.0")
@@ -453,12 +431,6 @@ use_repo(npm, "npm")
453431

454432
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
455433

456-
bazel_dep(name = "sv-elab", version = "2026-10-13")
457-
local_path_override(
458-
module_name = "sv-elab",
459-
path = "third-party/sv-elab",
460-
)
461-
462434
# --- pandoc for macOS arm64 (used by //docs:man_pages) ---
463435
#
464436
# The macosx_11_0_arm64 wheel of pypandoc-binary (1.16 through 1.17) ships

0 commit comments

Comments
 (0)