Skip to content

bazel: stop carrying build files bazel-orfs can generate - #4501

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:drop-bazel-surface
Sep 8, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:drop-bazel-surface

Conversation

@oharboe

@oharboe oharboe commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR bazel-orfs has the machinery to build any ORFS from within the bazel-orfs repository now, so remove hundreds of files of cruft in ORFS. Less noise and churn by having that machinery in bazel-orfs.

ORFS is a pinned storage of scripts, PDKs and example designs as far as bazel-orfs is concerned.

https://github.com/The-OpenROAD-Project/bazel-orfs#quick-start

This also has the effect that you can build any ORFS design from within OpenROAD or bazel-orfs:

bazelisk run @orfs//flow/designs/asap7/gcd:gcd_final gui_final

I haven't bumped OpenROAD in a while to new bazel-orfs, there hasn't been a need or call for it as bazel-orfs in OpenROAD is only used for regression testing and presumably it is doing its job fine with the version that it has. Even post bumping bazel-orfs in OpenROAD, nothing will change in ORFS w.r.t. regression testing in CI, building any design like above is just a new feature that I don't think anyone would use over bazelisk run //:install + make from ORFS, in practice.

@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 all Bazel-related configuration and build files from the repository, including MODULE.bazel, root and subdirectory BUILD files, and design-specific Bazel targets. I have no feedback to provide as there are no review comments.

ORFS is an immutable store of reference designs, scripts, PDKs and
metadata. It is not a build system, and its CI does not run one: no
workflow in .github/workflows/ invokes bazel. Every file deleted here
exists solely for bazel-orfs, an out-of-tree consumer, which can now
generate or carry all of it.

Deleted:

  56  flow/designs/<platform>/<design>/BUILD
      Every one is exactly two lines of content:
          load("//flow/designs:design.bzl", "design")
          design(config = "config.mk")
      bazel-orfs generates these for any design directory that has a
      config.mk and no BUILD.

   2  flow/BUILD, flow/util/BUILD
      The orfs_pdk targets, the makefile/makefile_yosys filegroups and
      the exports_files globs over platforms/. bazel-orfs generates
      these too; orfs_pdk has to be declared inside this repository
      because a glob() only sees its own, and generating the BUILD is
      what lets the glob run here while the rule lives with the rules.

   3  MODULE.bazel, BUILD.bazel, bazel/BUILD
      MODULE.bazel's remaining job was orfs_designs() and a pip
      requirements lock for the bazel-only python targets. bazel-orfs
      declares orfs_designs() itself now. BUILD.bazel wraps
      bazel/install.sh; bazel/README.md and install.sh are kept, since
      they document the docker-image path and are not bazel packages.

Kept deliberately: the other ~116 design BUILD files, which declare
files() groups or genuinely per-design rules, and flow/designs/design.bzl
which they load. A files() group name is not derivable from a
directory's contents -- src/cva6 declares files("verilog") while holding
no .v or .sv, and prim/rtl holds both .sv and .svh but declares
files("include") -- because the name is decided by what other configs
reference. Those follow only if and when bazel-orfs carries them
explicitly.

Zero effect on this repository's own CI, which never invoked bazel.

Verification, from a bazel-orfs workspace pinned at this commit:

  bazelisk query '@orfs//flow/designs/...:*'

lists 4135 targets, byte-identical to the same query before this commit
-- 0 added, 0 lost. Measured, not predicted.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@openroad-ci

openroad-ci commented Sep 2, 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 6e9b3cb · Jenkins build #4 · 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

@oharboe

This comment was marked as outdated.

@oharboe oharboe closed this Sep 2, 2026
@oharboe
oharboe requested a review from maliberty September 5, 2026 06:46
@oharboe oharboe changed the title bazel: stop carrying build files bazel-orfs can generate — DO NOT REVIEW, work in progress bazel: stop carrying build files bazel-orfs can generate Sep 5, 2026
@oharboe oharboe reopened this Sep 5, 2026
@oharboe
oharboe marked this pull request as ready for review September 5, 2026 06:47
@maliberty
maliberty merged commit a71b115 into The-OpenROAD-Project:master Sep 8, 2026
16 checks passed
maliberty pushed a commit that referenced this pull request Sep 10, 2026
#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>
oharboe added a commit to oharboe/OpenROAD-flow-scripts that referenced this pull request Nov 8, 2026
The-OpenROAD-Project#4501 removed ORFS's MODULE.bazel and BUILD files, and c9e1ba4 the
plumbing that only they referenced. These files and doc sections
describe or serve that build, and nothing reads them now:

  flow/README.md               the bazel targets of every design
                               (<n>_synth, ..., <n>_test) and how to
                               add a design's BUILD.bazel. Those
                               targets and design.bzl are gone.

  docs/user/BuildLocally.md    "Using Bazel to build OpenROAD and run
                               the ORFS flow" runs `bazelisk run
                               //:install_for_bazel`, a target that
                               went with the root BUILD.bazel. "Build
                               OpenROAD and run a few ORFS flows with
                               Bazel" builds designs/asap7/gcd targets
                               and bumps a MODULE.bazel, neither of
                               which exists.

  bazel/install.sh             its only caller was //:install_for_bazel.
  bazel/README.md              describes flow/BUILD.bazel examples and
                               the bazel-orfs version pin in
                               MODULE.bazel.
  bazel/slang-compat/README    a placeholder for when ORFS is the root
                               module consuming tools/OpenROAD through
                               git_override. Without a MODULE.bazel,
                               ORFS is never the root module.

  flow/util/cred_helper.py     a GCP credential helper for the bazel
                               artifact repository (fabdb02);
                               nothing references it.
  flow/util/open_plots.sh      an xdg-open wrapper for the bazel
                               plot_congestion target, removed in
                               The-OpenROAD-Project#4085 and The-OpenROAD-Project#4096.

The /bazel/ line in CODEOWNERS goes with the directory.

.bazelversion and .bazelignore stay: bazelisk in
docker/Dockerfile.claude reads .bazelversion.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
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