Skip to content

Commit 6f8f223

Browse files
committed
bazel: reinstate ditch-docker via archive_override for orfs
Reinstates #10237 (reverted in #10333) with one change: the orfs module override switches from git_override to archive_override so PII machines that block direct git access to github.com (but allow HTTPS tarball downloads) can resolve the module graph without going through the docker image. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent ff29559 commit 6f8f223

5 files changed

Lines changed: 3485 additions & 285 deletions

File tree

MODULE.bazel

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bazel_dep(name = "verilator", version = "5.036.bcr.3", dev_dependency = True)
100100
bazel_dep(name = "bazel-orfs", dev_dependency = True)
101101
bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True)
102102

103-
BAZEL_ORFS_COMMIT = "f5e20547f93729a4f67929902aaa3386d933bad0"
103+
BAZEL_ORFS_COMMIT = "78f19f25cec73bdec3517a76465dec7ce17ce227"
104104

105105
BAZEL_ORFS_REMOTE = "https://github.com/The-OpenROAD-Project/bazel-orfs.git"
106106

@@ -118,6 +118,40 @@ git_override(
118118
strip_prefix = "verilog",
119119
)
120120

121+
# bazel-orfs pulls in orfs without a version and patches yosys, relying on
122+
# overrides that only apply when bazel-orfs is the root module. Mirror them
123+
# here so OpenROAD-as-root can resolve the module graph.
124+
#
125+
# Use archive_override (HTTPS tarball) rather than git_override so the
126+
# build resolves on networks that block direct git access to github.com.
127+
ORFS_COMMIT = "10a2baea2171059ec14cda9a5855aa26dd7572c6"
128+
129+
bazel_dep(name = "orfs", dev_dependency = True)
130+
archive_override(
131+
module_name = "orfs",
132+
patch_strip = 1,
133+
patches = [
134+
"//bazel/bazel-orfs-patches:0035-fix-remove-non-root-overrides-from-MODULE.bazel.patch",
135+
],
136+
sha256 = "8325c6755215857a87a84db078d47dfbb2dfcbef70eaf0dd376fe5a7a363cd58",
137+
strip_prefix = "OpenROAD-flow-scripts-" + ORFS_COMMIT,
138+
urls = ["https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/archive/" + ORFS_COMMIT + ".tar.gz"],
139+
)
140+
141+
bazel_dep(name = "yosys", version = "0.62.bcr.2", dev_dependency = True)
142+
143+
# yosys-slang is not on BCR. Pin to a commit on povik/yosys-slang master
144+
# that has the upstream Bazel build (povik/yosys-slang#310) and the
145+
# slang.so visibility fix (povik/yosys-slang#311). Submodules pull in
146+
# vendored slang and fmt sources.
147+
bazel_dep(name = "yosys-slang", dev_dependency = True)
148+
git_override(
149+
module_name = "yosys-slang",
150+
commit = "7753ea70431d85929292b90c33b32f6dbdb3b048",
151+
init_submodules = True,
152+
remote = "https://github.com/povik/yosys-slang.git",
153+
)
154+
121155
# --- Extensions ---
122156

123157
llvm = use_extension(
@@ -172,16 +206,13 @@ npm.npm_translate_lock(
172206
use_repo(npm, "npm")
173207

174208
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories", dev_dependency = True)
175-
176-
# To bump version, run: bazelisk run @bazel-orfs//:bump
177209
orfs.default(
178-
# Official image https://hub.docker.com/r/openroad/orfs/tags
179-
image = "docker.io/openroad/orfs:26Q1-816-gf40d2f346",
180-
# Use OpenROAD of this repo instead of from the docker image
210+
# Use OpenROAD of this repo instead of the one bundled with @orfs
181211
openroad = "//:openroad",
182-
sha256 = "2b05a14ae8062b4af82b245d648e95fa0293e09b61b57468518b66578744afb8",
212+
# Expose the yosys-slang plugin via YOSYS_PLUGIN_PATH so
213+
# SYNTH_HDL_FRONTEND=slang works in mock-array and other tests.
214+
yosys_plugins = ["@yosys-slang//src/yosys_plugin:slang.so"],
183215
)
184-
use_repo(orfs, "docker_orfs")
185216

186217
# --- Overrides ---
187218

0 commit comments

Comments
 (0)