Skip to content

Commit c9e1ba4

Browse files
oharboeclaude
andcommitted
chore: drop bazel plumbing left over after the bazel surface removal
#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 #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>
1 parent 31e744d commit c9e1ba4

7 files changed

Lines changed: 19 additions & 238 deletions

File tree

‎.bazelrc‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎docs/user/AutoMemories.md‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ clear error.
130130
## Trying it
131131

132132
```shell
133-
# Unit tests (fast, no EDA tools):
134-
bazelisk test //flow:memories_tests
135-
136-
# The demo design:
137133
make DESIGN_CONFIG=designs/asap7/tinyRocket/config.mk synth floorplan
138134
```
139135

@@ -148,15 +144,25 @@ python3 flow/scripts/memories/gen_memories.py \
148144
## Consuming from bazel-orfs
149145

150146
Everything downstream keys off generated files, so a build system can
151-
declare them as ordinary stage outputs and transitive dependencies. In
152-
bazel-orfs each stage runs in a sandbox where only declared outputs
153-
survive, so it additionally needs to declare `memories.json` plus the
154-
`memories/` directory (a directory artifact — the per-memory file
155-
names are only known at run time) as canonicalize outputs and stage
156-
them into every downstream stage's sandbox. The bazel-orfs change that
157-
does this is carried alongside this feature as
158-
`flow/scripts/memories/bazel-orfs-auto-memories.patch`, to be
159-
upstreamed to bazel-orfs once the feature lands here.
147+
declare them as ordinary stage outputs and transitive dependencies.
148+
149+
A sandboxed build system, where only declared outputs survive a step and
150+
only declared inputs are present, needs three things:
151+
152+
- `memories.json` and the `memories/` directory declared as outputs of
153+
canonicalization. `memories/` has to be a directory rather than a file
154+
list: the per-memory file names are only known once the RTL is
155+
scanned.
156+
- both staged into every later step, because the flow reads them by
157+
globbing the results dir (`load.tcl` takes `memories/*.lef`,
158+
`read_liberty.tcl` takes `*.lib`) rather than through a variable.
159+
- `memories_inferred.json` staged into synthesis as well. Nothing reads
160+
it there, but `make` checks the whole chain
161+
(`yosys-dependencies` -> `memories.json` -> `memories_inferred.json`),
162+
and with the tail of it absent it re-runs detection at the wrong point
163+
in the flow.
164+
165+
bazel-orfs implements this.
160166

161167
## Variables
162168

‎flow/scripts/memories/bazel-orfs-auto-memories.patch‎

Lines changed: 0 additions & 170 deletions
This file was deleted.

‎patches/bison/BUILD.bazel‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎patches/fakeram/BUILD.bazel‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎patches/icu/BUILD.bazel‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎patches/tcl_lang/BUILD.bazel‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)