Skip to content

Commit d406025

Browse files
authored
Merge pull request #10334 from oharboe/reinstate-ditch-docker-archive-override
bazel: reinstate ditch-docker via archive_override for orfs
2 parents 07427ed + 6f8f223 commit d406025

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
@@ -102,7 +102,7 @@ bazel_dep(name = "rules_nodejs", version = "6.7.3", dev_dependency = True)
102102
bazel_dep(name = "bazel-orfs", dev_dependency = True)
103103
bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True)
104104

105-
BAZEL_ORFS_COMMIT = "f5e20547f93729a4f67929902aaa3386d933bad0"
105+
BAZEL_ORFS_COMMIT = "78f19f25cec73bdec3517a76465dec7ce17ce227"
106106

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

@@ -120,6 +120,40 @@ git_override(
120120
strip_prefix = "verilog",
121121
)
122122

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

125159
llvm = use_extension(
@@ -174,16 +208,13 @@ npm.npm_translate_lock(
174208
use_repo(npm, "npm")
175209

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

188219
# --- Overrides ---
189220

0 commit comments

Comments
 (0)