Skip to content

fix missing file in bazel build - #391

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:sta_fix_bzl
Jul 23, 2026
Merged

fix missing file in bazel build#391
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:sta_fix_bzl

Conversation

@dsengupta0628

Copy link
Copy Markdown
Contributor

Add missing tcl script from bazel build

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628 dsengupta0628 self-assigned this Jul 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 updates the BUILD file to include the 'spice/WriteSpice.tcl' script in the tcl_srcs list. There are no review comments, and I have no feedback to provide.

@dsengupta0628
dsengupta0628 requested a review from maliberty July 23, 2026 13:36
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@dsengupta0628

Copy link
Copy Markdown
Contributor Author

spice/WriteSpice.tcl was never added to the Tcl lists in src/sta/BUILD, though CMake has it in both its encode lists (my slip while pulling upstream).
The SWIG glue (WriteSpice.i) is listed, so the C++ compiled - the Tcl command wrappers just never get registered.

The deeper issue though: src/sta/BUILD maintains two Tcl lists by hand.
tcl_srcs : encoded into the standalone OpenSTA binary
exported_tcl : re-exported via dbSta into the OpenROAD binary

exported_tcl is just tcl_srcs minus a few files OpenROAD replaces (Init.tcl, network/Link.tcl, verilog/Verilog.tcl).
Keeping two parallel lists in sync manually is kind of risky.

Potential fix for this long term- that will derive exported_tcl from tcl_srcs instead of maintaining it separately:

  sta_only_tcl = [
      "tcl/Init.tcl",
      "network/Link.tcl",
      "verilog/Verilog.tcl",
  ]
  exported_tcl = [f for f in tcl_srcs if f not in sta_only_tcl]

This makes tcl_srcs the single source of truth; any new command file flows to both binaries automatically unless explicitly excluded.
Set is identical to today; only ordering changes, which is safe (the two build systems already use different orders and both work).

Happy to push above change in this PR if agreed upon

@maliberty
maliberty merged commit bb610c9 into The-OpenROAD-Project:master Jul 23, 2026
7 checks passed
@maliberty
maliberty deleted the sta_fix_bzl branch July 23, 2026 15:27
@maliberty

Copy link
Copy Markdown
Member

Your suggestion looks good.

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.

2 participants