Skip to content

chore: drop bazel plumbing left over after the bazel surface removal - #4524

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:chore/drop-dead-bazel-plumbing
Sep 10, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:chore/drop-dead-bazel-plumbing

Conversation

@oharboe

@oharboe oharboe commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

What this removes

#4501 took out ORFS's bazel surface, MODULE.bazel among it. A handful
of files whose only purpose was to be referenced from that
MODULE.bazel are still in the tree, and nothing reads them now.

Removed Why it is dead
.bazelrc Registry pins, C++ toolchain flags and a MODULE.bazel.lock policy for a bazel build that no longer exists. No workflow in .github/ invokes bazel.
patches/{bison,icu,fakeram}/BUILD.bazel exports_files(glob(["*.patch"])), so a root MODULE.bazel could name the patches in a single_version_override. With no MODULE.bazel, nothing names them. Each file's own docstring says "Drop when tools/OpenROAD drops its copy" — tools/OpenROAD still has its copies, and those are the ones that are actually used.
patches/tcl_lang/ Removed entirely: the directory held no patch at all, only the BUILD.bazel whose glob therefore matched nothing.
flow/scripts/memories/bazel-orfs-auto-memories.patch A patch against bazel-orfs, carried here and described in AutoMemories.md as "to be upstreamed to bazel-orfs once the feature lands here". bazel-orfs implements AUTO_MEMORIES support itself now, and this copy no longer matches its tree.

What deliberately stays

  • The patch files under patches/{bison,icu,fakeram}. Only the
    BUILD.bazel label plumbing goes; the patches still describe real
    fixes. In particular patches/fakeram/0001-Add-ORFS-ASAP7-backend.patch
    is left alone — see the note below.
  • .bazelversion — docker/Dockerfile.claude installs bazelisk and
    relies on it to pick the right release.
  • .bazelignore — still load-bearing for anything that consumes
    this tree from bazel. It keeps tools/ from being walked, and as an
    external repository bazel turns it into --deleted_packages; without
    it tools/OpenROAD and tools/yosys become loadable packages and
    their own bazel files get pulled into loading.

Docs

docs/user/AutoMemories.md loses a bazelisk test //flow:memories_tests
line — that target went with flow/BUILD in #4501 — and its "Consuming
from bazel-orfs" section now states what a sandboxed build system has to
declare, instead of pointing at the patch this PR deletes.

Unrelated finding, for whoever owns AUTO_MEMORIES

Not fixed here, and not a consequence of this PR, but worth recording
while in the area: the ASAP7 FakeRAM backend is not applied to the
copy ORFS vendors.

gen_memories.py invokes tools/FakeRAM2.0/run.py --orfs_asap7_backend.
That flag comes from patches/fakeram/0001-Add-ORFS-ASAP7-backend.patch,
which the deleted MODULE.bazel used to apply to FakeRAM when it was an
external bazel module. FakeRAM has since been vendored at
tools/FakeRAM2.0/ (the standalone repo is archived), and nothing
applies the patch to the vendored copy — there is no
tools/FakeRAM2.0/orfs_asap7/ and no --orfs_asap7_backend in
run.py.

The visible effect on a clean master checkout:

$ cd flow/scripts/memories && python3 -m unittest discover -s . -p '*_test.py'
ERROR: test_additional_memories_forces_conversion
ERROR: test_flow_contract
ERROR: test_no_memories_still_writes_contract_files
Ran 19 tests in 0.096s
FAILED (errors=3)

subprocess.CalledProcessError: Command '[..., 'tools/FakeRAM2.0/run.py',
'--orfs_asap7_backend', ...]' returned non-zero exit status 2

So three of ORFS's own AUTO_MEMORIES unit tests fail, and
AUTO_MEMORIES=1 cannot generate views at all. The fix is presumably to
apply that patch to tools/FakeRAM2.0 (or vendor it pre-patched) and
then drop the patch file — deliberately left out of this PR, which is
scoped to removing dead plumbing rather than changing behaviour.

🤖 Generated with Claude Code

The-OpenROAD-Project#4501 removed ORFS's bazel surface, MODULE.bazel among it. A few files
whose only purpose was to be referenced from that MODULE.bazel are still
here, and nothing reads them any more.

  .bazelrc                     registry pins, C++ toolchain flags and a
                               MODULE.bazel.lock policy for a bazel
                               build that no longer exists. No workflow
                               in .github/ invokes bazel.

  patches/{bison,icu,fakeram}/BUILD.bazel
  patches/tcl_lang/BUILD.bazel  exports_files(glob(["*.patch"])) so a
                               root MODULE.bazel could name the patches
                               in single_version_override. With no
                               MODULE.bazel nothing names them. Each
                               file's own docstring said "Drop when
                               tools/OpenROAD drops its copy";
                               tools/OpenROAD still has its copies, and
                               those are the ones that matter.

  patches/tcl_lang/            goes entirely: it held no patch at all,
                               so its glob matched nothing.

  flow/scripts/memories/bazel-orfs-auto-memories.patch
                               a patch against bazel-orfs, carried here
                               and described in AutoMemories.md as "to
                               be upstreamed to bazel-orfs once the
                               feature lands here". bazel-orfs
                               implements AUTO_MEMORIES support itself
                               now, and this copy no longer matches its
                               tree.

The patch files under patches/{bison,icu,fakeram} stay. Only the
BUILD.bazel label plumbing goes; the patches themselves still describe
real fixes.

.bazelignore and .bazelversion also stay, and are not leftovers:
.bazelversion is what bazelisk reads in docker/Dockerfile.claude, and
.bazelignore keeps tools/ from being walked by anything that does
consume this tree from bazel.

AutoMemories.md loses a `bazelisk test //flow:memories_tests` line --
that target went with flow/BUILD in The-OpenROAD-Project#4501 -- and its "Consuming from
bazel-orfs" section now states what a sandboxed build system has to
declare instead of pointing at the deleted patch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@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 removes several Bazel configuration, patch, and BUILD files, and updates the AutoMemories documentation to describe how bazel-orfs handles sandboxed builds. The review feedback identifies two inaccuracies in the updated documentation: a minor typo in the glob pattern for liberty files and an incorrect order in the described dependency chain.

Comment thread docs/user/AutoMemories.md Resolved
Comment thread docs/user/AutoMemories.md Resolved
Two review notes on the AutoMemories "Consuming from bazel-orfs"
section.

read_liberty.tcl globs $(RESULTS_DIR)/memories/*.lib, not *.lib. The
text said the latter, which reads as if the liberty views were picked up
from the results dir root while the LEFs came from memories/. Both come
from memories/.

The dependency chain is now written as the make rules themselves. The
prose form invited reading it as execution order, which is the reverse:
memories_inferred.json is *built* first, but `yosys-dependencies`
*depends on* memories.json, which depends on memories_inferred.json.
Showing the three rules removes the ambiguity rather than restating it,
and says which end of the chain goes missing in a sandbox.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe requested a review from maliberty September 9, 2026 14:39
@openroad-ci

openroad-ci commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch. Advisory — results are log-only and do not affect build status. The authoritative QoR gate remains the local rules-file check.

Commit 45eb674 · Jenkins build #1 · Baseline: build

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.
Design Variant Verdict local vs inline passed / failed / missing
asap7/aes base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes-block base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes-mbff base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/cva6 base ✅ pass ✅ MATCH 12 / 0 / 0
asap7/ethmac base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/ethmac_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/gcd-ccs base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/jpeg_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/mock-alu base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/mock-cpu base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/riscv32i-mock-sram base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/swerv_wrapper base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/uart base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/aes base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/aes-hybrid base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/uart-blocks base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/aes base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/aes base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/i2c-gpio-expander base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/spi base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/aes base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ariane133 base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ariane136 base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/black_parrot base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/bp_be_top base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/bp_fe_top base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/bp_multi_top base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/cva6 base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/dynamic_node base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/mempool_group base ✅ pass ✅ MATCH 12 / 0 / 0
nangate45/swerv base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/swerv_wrapper base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/tinyRocket base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/aes base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/chameleon base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/microwatt base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/aes base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0

@maliberty

Copy link
Copy Markdown
Member

Isn't whoever owns AUTO_MEMORIES you?

@maliberty
maliberty merged commit d9b02cc into The-OpenROAD-Project:master Sep 10, 2026
12 checks passed
@oharboe

oharboe commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

The community now has "ownership" of it. I don't know if anyone is using it. It may be that automemories and fake memories for that matter has no users currently. I don't know exactly who and how ORFS/OpenROAD is being used...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants