Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ cc_binary(
"//src/utl",
"@boost.stacktrace",
"@rules_cc//cc/runfiles",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down Expand Up @@ -213,7 +213,7 @@ cc_library(
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/synchronization",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
] + OPENROAD_LIBRARY_DEPS,
)

Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ bazel_dep(name = "spdlog", version = "1.15.1")
bazel_dep(name = "tcmalloc", version = "0.0.0-20250927-12f2552")
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
bazel_dep(name = "yaml-cpp", version = "0.8.0")
bazel_dep(name = "tcl_lang", version = "8.6.16.bcr.1")

# Make compilation DB (and possibly build cleaner)
bazel_dep(name = "bant", version = "0.2.4", dev_dependency = True)
Expand Down
2 changes: 2 additions & 0 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ http_archive(
# Direct dependencies needed in openroad, and others that these in turn need.
# This essentially reads as a TODO list of what needs to be upstreamed to BCR
load("@rules_hdl//dependency_support/com_github_westes_flex:com_github_westes_flex.bzl", "com_github_westes_flex")
load("@rules_hdl//dependency_support/net_zlib:net_zlib.bzl", "net_zlib")
load("@rules_hdl//dependency_support/org_gnu_bison:org_gnu_bison.bzl", "org_gnu_bison")
load("@rules_hdl//dependency_support/org_pcre_ftp:org_pcre_ftp.bzl", "org_pcre_ftp")
load("@rules_hdl//dependency_support/org_swig:org_swig.bzl", "org_swig")
load("@rules_hdl//dependency_support/tk_tcl:tk_tcl.bzl", "tk_tcl")

tk_tcl()

# Swig exists in BCR, but in a newer version where we need to test how to make
# it to work with TCL.
Expand All @@ -42,7 +38,4 @@ com_github_westes_flex()

org_gnu_bison()

# remaining user is tcl. Once we can get that from BCR, this can go.
net_zlib() # BCR has @zlib we use, but some above dep uses it w/ differet name

org_pcre_ftp() # there is a newer pcre2 in BCR
3 changes: 3 additions & 0 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ cc_library(
srcs = [
"InitRunFiles.cpp",
],
data = [
"@tcl_lang//:tcl_core",
],
visibility = ["//visibility:public"],
deps = [
"@rules_cc//cc/runfiles",
Expand Down
7 changes: 4 additions & 3 deletions bazel/InitRunFiles.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <unistd.h>

#include <climits>
#include <cstdlib>
#include <iostream>
#include <memory>
#include <optional>
Expand Down Expand Up @@ -55,11 +56,11 @@ class BazelInitializer
}

// Set the TCL_LIBRARY environment variable
const std::string tcl_path = runfiles->Rlocation("tk_tcl/library/");
const std::string tcl_path = runfiles->Rlocation("tcl_lang/library/");
if (!tcl_path.empty()) {
setenv("TCL_LIBRARY", tcl_path.c_str(), 0);
setenv("TCL_LIBRARY", tcl_path.c_str(), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "setenv" is directly included [misc-include-cleaner]

bazel/InitRunFiles.cpp:0:

- #include <unistd.h>
+ #include <stdlib.h>
+ #include <unistd.h>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "setenv" is directly included [misc-include-cleaner]

bazel/InitRunFiles.cpp:1:

- #include <unistd.h>
+ #include <stdlib.h>
+ #include <unistd.h>

} else {
std::cerr << "Error: Could not locate 'tk_tcl/library/' in runfiles."
std::cerr << "Error: Could not locate 'tcl_lang/library/' in runfiles."
<< std::endl;
std::exit(1);
}
Expand Down
6 changes: 1 addition & 5 deletions bazel/tcl_encode_sta.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ def _tcl_encode_sta_impl(ctx):
arguments = [args],
tools = [ctx.executable._tclsh, ctx.file._encode_script],
executable = ctx.executable._tclsh,
env = {
# FIXME why is this needed?
"TCL_LIBRARY": ctx.executable._tclsh.path + ".runfiles/tk_tcl/library",
},
)
return [DefaultInfo(files = depset([output_file]))]

Expand All @@ -51,7 +47,7 @@ tcl_encode_sta = rule(
allow_single_file = True,
),
"_tclsh": attr.label(
default = "@tk_tcl//:tclsh",
default = "@tcl_lang//:tclsh",
executable = True,
cfg = "exec",
),
Comment on lines 49 to 53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

While you've correctly updated the default _tclsh label, there's a related hardcoded path in this file that also needs to be updated. In the _tcl_encode_sta_impl implementation at line 29, the TCL_LIBRARY environment variable is set using the old path:

env = {
    # FIXME why is this needed?
    "TCL_LIBRARY": ctx.executable._tclsh.path + ".runfiles/tk_tcl/library",
},

This should be updated to use tcl_lang/library to match the new dependency:

env = {
    # FIXME why is this needed?
    "TCL_LIBRARY": ctx.executable._tclsh.path + ".runfiles/tcl_lang/library",
},

Without this change, the tcl_encode_sta rule will likely fail to find the Tcl library at runtime.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds reasonable but i can run the regression without that change. Can this be removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this environment setting.

Expand Down
2 changes: 1 addition & 1 deletion src/ant/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ cc_library(
"//src/odb",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/cgt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cc_library(
"//src/utl",
"@abc",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/cts/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ cc_library(
"//src/rsz",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/dbSta/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cc_library(
"@abseil-cpp//absl/synchronization",
"@boost.json",
"@spdlog",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down Expand Up @@ -138,7 +138,7 @@ cc_library(
"//src/utl",
"@boost.json",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/dft/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ cc_library(
"//src/odb",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/dpl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ cc_library(
"@boost.tokenizer",
"@boost.utility",
"@coin-or-lemon//:lemon",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down Expand Up @@ -133,7 +133,7 @@ cc_library(
"@boost.polygon",
"@boost.stacktrace",
"@boost.utility",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/drt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ cc_library(
"@boost.polygon",
"@boost.serialization",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/dst/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cc_library(
"//src/utl",
"@boost.asio",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/est/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cc_library(
"@boost.multi_array",
"@boost.stacktrace",
"@spdlog",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/exa/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cc_library(
deps = [
"//src/odb",
"//src/utl",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down Expand Up @@ -56,7 +56,7 @@ cc_library(
"//src/odb",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/fin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cc_library(
"@boost.polygon",
"@boost.property_tree",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/gpl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cc_library(
"@openmp",
"@or-tools//ortools/linear_solver",
"@or-tools//ortools/sat:cp_model",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/grt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ cc_library(
"@boost.iterator",
"@boost.stacktrace",
"@openmp",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/gui/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cc_library(
"//src/odb",
"@abseil-cpp//absl/synchronization",
"@boost.multi_array",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down Expand Up @@ -89,7 +89,7 @@ QT_GUI_PLATFORMS = {
"@boost.multi_array",
"@boost.stacktrace",
"@spdlog",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
] + ([":uic_lib"] if platform == "headless" else []),
)
for platform, suffix in QT_GUI_PLATFORMS.items()
Expand Down
2 changes: 1 addition & 1 deletion src/ifp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cc_library(
"//src/sta:opensta_lib",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/mpl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cc_library(
"//src/odb",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/odb/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ cc_library(
"@boost.regex",
"@boost.spirit",
"@spdlog",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
"@yaml-cpp",
"@zlib",
],
Expand Down Expand Up @@ -152,7 +152,7 @@ cc_library(
"@boost.multi_array",
"@boost.polygon",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/pad/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cc_library(
"@boost.icl",
"@boost.polygon",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/par/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ cc_library(
"@boost.stacktrace",
"@boost.tokenizer",
"@boost.utility",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/pdn/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cc_library(
"@boost.geometry",
"@boost.polygon",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/ppl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cc_library(
"@boost.container_hash",
"@boost.random",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/psm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cc_library(
"@boost.polygon",
"@boost.stacktrace",
"@eigen",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/ram/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cc_library(
"//src/sta:opensta_lib",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/rcx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ cc_library(
"//src/odb",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/rmp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cc_library(
"//src/sta:opensta_lib",
"//src/utl",
"@boost.stacktrace",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/rmp/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@ cc_test(
"@abc",
"@googletest//:gtest",
"@googletest//:gtest_main",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)
2 changes: 1 addition & 1 deletion src/rsz/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ cc_library(
"@boost.multi_array",
"@boost.stacktrace",
"@spdlog",
"@tk_tcl//:tcl",
"@tcl_lang//:tcl",
],
)

Expand Down
2 changes: 1 addition & 1 deletion src/sta
Submodule sta updated 1 files
+2 −2 BUILD
Loading
Loading