The bazel_dep was non-dev, forcing downstream Bazel consumers to
inherit OpenROAD's pinned LLVM toolchain. This conflicts when
consumers configure their own C++ toolchain.
The extension and toolchain registration were already dev_dependency.
Making the bazel_dep dev_dependency too keeps it consistent and
invisible to downstream modules. The llvm_prebuilt build_file
reference works because dev deps are still resolved for the
declaring module's own build.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
The aspect_rules_js, rules_nodejs, and their use_extension calls
(node toolchain, npm translate_lock) exist solely for JavaScript
unit tests in src/web/test/. No production cc_library target
depends on npm packages — the JS files are served from disk by
the C++ web server.
Changes:
- Mark bazel_dep entries for aspect_rules_js and rules_nodejs as
dev_dependency = True in MODULE.bazel
- Mark node and npm use_extension calls as dev_dependency = True
- Remove isolate = True from npm extension (unnecessary when
dev_dependency, and it required --experimental_isolated_extension_usages
in downstream consumers)
- Move package.json and pnpm-lock.yaml from src/web/ to src/web/test/
- Move npm_link_all_packages from src/web/BUILD to src/web/test/BUILD
- Replace js_library with a plain filegroup for cross-package JS
file references (no @aspect_rules_js dependency in production BUILD)
Downstream Bazel consumers no longer inherit npm/node infrastructure,
eliminating the need for patches like openroad-remove-isolate.patch.
Tested:
- All 10 js_test targets in //src/web/test pass
- Downstream consumer builds without any npm-related patches
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* For Tcl9, all relevant system tcl files, the tcl library and
readline library, are packed in a zip file, compiled into the
binary mounted on the virtual filesystem //zipfs:/
* On Tcl 8, which does not allow to do that quite yet, we
take the same directory structure (unpacked), and use them
via runfiles as before; however, since this is now a single
directory the runfile symbolic links are reduced to one.
Default for now is to use the runfile method, as we're still on
Tcl8; The code is prepared for Tcl9, awaiting some changes in
STA to be merged, then we can change the default.
Fixes: #9962#9980
Signed-off-by: Henner Zeller <h.zeller@acm.org>
The bazel-orfs extension no longer generates the
com_github_nixos_patchelf_download repository.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Address PR #9827 review feedback:
- Group all dev_dependency bazel_dep entries into a separate section
in MODULE.bazel for easier reasoning (hzeller)
- Combine two register_toolchains calls into one (gemini-code-assist)
- Split downstream MODULE.bazel docs into required and suggested
sections, making toolchains_llvm optional (hzeller)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/web uses @npm for bundled assets, so aspect_rules_js, rules_nodejs,
and their extensions (node, npm) must be non-dev for downstream consumers.
Add .bazelrc to test/downstream for --experimental_isolated_extension_usages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Extract the shared commit hash and remote URL into BAZEL_ORFS_COMMIT
and BAZEL_ORFS_REMOTE variables so the two git_override blocks stay
in sync automatically.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
bazel-orfs moved generate.bzl and verilog.bzl into the
bazel-orfs-verilog submodule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
- Add buildifier disable comments for native sh_test/sh_binary in root
BUILD.bazel (rules_shell is a dev_dependency, cannot be loaded by
downstream consumers)
- Patch rules_chisel to handle dev_dependency in extension_metadata,
fixing "root_module_direct_deps must be empty" error
- Regenerate MODULE.bazel.lock
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
The rules_chisel bazel_dep is declared as dev_dependency (line 22),
but the corresponding use_extension was not. This caused downstream
consumers to fail with "no repo visible as '@rules_chisel'".
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
The local bazel-orfs moved chisel support from
@bazel-orfs//toolchains/scala:chisel.bzl to the standalone
@rules_chisel//chisel:defs.bzl package. Add rules_chisel as a
dev dependency, configure the chisel extension toolchain, and
update the mock-array BUILD load path accordingly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
toolchains_llvm enforces root-module-only extension usage, causing
failures when OpenROAD is consumed as a dependency. The bazel_dep
stays non-dev (llvm_prebuilt's build_file references it), but the
use_extension and register_toolchains are now dev_dependency.
Downstream consumers must configure their own C++ toolchain.
Signed-off-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
These deps are only needed for packaging (rules_shell, rules_pkg) and
test/orfs simulation targets (rules_verilator, verilator). They are not
required by the //:openroad binary. Marking them dev_dependency prevents
MVS from forcing their versions on downstream consumers.
Also split register_toolchains so the verilator toolchain registration
is dev_dependency — it only needs to be active when building OpenROAD
directly, not when consuming it as a dependency.
Signed-off-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
I updated the install procedure to use the pkg_tar
module. The install works as before, but now you
can also install optionally to another location.
Closes: #9635
Signed-off-by: Friedrich Beckmann <friedrich.beckmann@tha.de>
use_repo_rule() does not accept dev_dependency as a keyword argument;
that parameter is only valid for use_extension(). Remove it and
consolidate the duplicate http_archive definition.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
These dependencies are only used for OpenROAD's own test infrastructure
(ORFS integration tests, Chisel mock-array, firtool binary) and are not
needed by downstream consumers of the openroad module.
Whittles away at #9629
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Remove scala_deps.scalatest() as it is not used in any BUILD file.
Add comment documenting that rules_scala is used by chisel_binary
from @bazel-orfs in test/orfs/mock-array.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>