From 6b74d254760a4146cd6348962a325c1d73da8b61 Mon Sep 17 00:00:00 2001 From: Tim Ansell Date: Tue, 19 Sep 2023 17:12:49 -0700 Subject: [PATCH] Temp --- .../com_justbuchanan_rules_qt/BUILD | 13 + .../com_justbuchanan_rules_qt.bzl | 26 + dependency_support/dependency_support.bzl | 2 + .../org_theopenroadproject/build_helper.bzl | 408 +++++++++ .../bundled.BUILD.bazel | 823 +++++++++--------- 5 files changed, 870 insertions(+), 402 deletions(-) create mode 100644 dependency_support/com_justbuchanan_rules_qt/BUILD create mode 100644 dependency_support/com_justbuchanan_rules_qt/com_justbuchanan_rules_qt.bzl create mode 100644 dependency_support/org_theopenroadproject/build_helper.bzl diff --git a/dependency_support/com_justbuchanan_rules_qt/BUILD b/dependency_support/com_justbuchanan_rules_qt/BUILD new file mode 100644 index 00000000..7ba50f93 --- /dev/null +++ b/dependency_support/com_justbuchanan_rules_qt/BUILD @@ -0,0 +1,13 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/dependency_support/com_justbuchanan_rules_qt/com_justbuchanan_rules_qt.bzl b/dependency_support/com_justbuchanan_rules_qt/com_justbuchanan_rules_qt.bzl new file mode 100644 index 00000000..b7504f62 --- /dev/null +++ b/dependency_support/com_justbuchanan_rules_qt/com_justbuchanan_rules_qt.bzl @@ -0,0 +1,26 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Registers Bazel workspaces for the GNU readline library.""" + +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +def com_justbuchanan_rules_qt(): + maybe( + git_repository, + name = "com_justbuchanan_rules_qt", + remote = "https://github.com/justbuchanan/bazel_rules_qt.git", + branch = "master", + ) diff --git a/dependency_support/dependency_support.bzl b/dependency_support/dependency_support.bzl index c59b0f05..61e59185 100644 --- a/dependency_support/dependency_support.bzl +++ b/dependency_support/dependency_support.bzl @@ -22,6 +22,7 @@ load("@rules_hdl//dependency_support/at_clifford_icestorm:at_clifford_icestorm.b load("@rules_hdl//dependency_support/at_clifford_yosys:at_clifford_yosys.bzl", "at_clifford_yosys") load("@rules_hdl//dependency_support/bazel_skylib:bazel_skylib.bzl", "bazel_skylib") load("@rules_hdl//dependency_support/boost:boost.bzl", "boost") +load("@rules_hdl//dependency_support/com_justbuchanan_rules_qt:com_justbuchanan_rules_qt.bzl", "com_justbuchanan_rules_qt") load("@rules_hdl//dependency_support/com_github_fmtlib_fmt:com_github_fmtlib_fmt.bzl", "com_github_fmtlib_fmt") load("@rules_hdl//dependency_support/com_github_gabime_spdlog:com_github_gabime_spdlog.bzl", "com_github_gabime_spdlog") load("@rules_hdl//dependency_support/com_github_libbacktrace:com_github_libbacktrace.bzl", "com_github_libbacktrace") @@ -67,6 +68,7 @@ def dependency_support(): at_clifford_yosys() bazel_skylib() boost() + com_justbuchanan_rules_qt() com_github_fmtlib_fmt() com_github_gabime_spdlog() com_github_libbacktrace() diff --git a/dependency_support/org_theopenroadproject/build_helper.bzl b/dependency_support/org_theopenroadproject/build_helper.bzl new file mode 100644 index 00000000..653ff378 --- /dev/null +++ b/dependency_support/org_theopenroadproject/build_helper.bzl @@ -0,0 +1,408 @@ +"""Source Tracking for OpenROAD""" + +OPENROAD_BINARY_SRCS_WITHOUT_MAIN = [ + #Root OpenRoad + ":openroad_swig", + ":openroad_tcl", + #Utility + ":logger_swig", + #InitFp + ":init_floorplan_swig", + ":init_floorplan_tcl", + #OpenDB + ":opendb_tcl", + ":opendb_tcl_common", + ":upf_swig", + ":upf_tcl", + #DbSTA + ":db_sta_tcl", + ":dbsta_swig", + #ioPlacer + ":ioplacer_tcl", + ":ioplacer_swig", + #Resizer + ":resizer_swig", + ":resizer_tcl", + #OpenDP + ":opendp_swig", + ":opendp_tcl", + #finale + ":finale_swig", + ":finale_tcl", + #TritionMP + ":tritonmp_swig", + ":tritonmp_tcl", + #antenna_checker + ":ant_swig", + ":ant_tcl", + #FastRoute + ":fastroute_swig", + ":fastroute_tcl", + #Replace + ":replace_swig", + ":replace_tcl", + #TritonCTS + ":triton_cts_tcl", + ":triton_cts_swig", + #Tapcell + ":tapcell_swig", + ":tapcell_tcl", + #OpenRCX + ":rcx_swig", + ":rcx_tcl", + #TritonRoute + ":triton_route_swig", + ":triton_route_tcl", + #PDNSim + ":pdn_sim_swig", + ":pdn_sim_tcl", + #PartitionManager + ":partition_manager_swig", + ":partition_manager_tcl", + #PDNGen + ":pdngen_tcl", + ":pdngen_swig", + #MPL2 + ":mpl2_swig", + ":mpl2_tcl", + #RMP + ":rmp_swig", + ":rmp_tcl", + #STT + ":stt_swig", + ":stt_tcl", + #Distributed + ":dst_swig", + ":dst_tcl", + #Dpo + ":dpo_swig", + ":dpo_tcl", + #Pad + ":pad_swig", + ":pad_tcl", + #dft + ":dft_swig", + ":dft_tcl", +] + +OPENROAD_BINARY_SRCS = OPENROAD_BINARY_SRCS_WITHOUT_MAIN + [ + #Root OpenRoad + "src/Main.cc", +] + +OPENROAD_COPTS = [ + "-fexceptions", + "-Wno-error", + "-Wall", + "-Wextra", + "-pedantic", + "-Wno-cast-qual", # typically from TCL swigging + "-Wredundant-decls", + "-Wformat-security", + "-Wno-sign-compare", + "-Wno-unused-parameter", +] + +OPENROAD_BINARY_DEPS = [ + ":logger", + ":opendb_lib", + ":openroad_version", + ":opensta_lib", + "//third_party/boost/do_not_include_from_google3_only_third_party/boost", + "//third_party/tcl_tk:tcl", +] + +OPENROAD_LIBRARY_HDRS_INCLUDE = [ + #Root OpenRoad + "include/ord/*.h", + "include/ord/*.hh", + #Utility + "src/utl/include/utl/*.h", + #InitFp + "src/ifp/include/ifp/*.hh", + #GUI + "src/gui/include/gui/*.h", + #DbSTA + "src/dbSta/include/db_sta/*.hh", + #ioPlacer + "src/ppl/include/ppl/*.h", + #Resizer + "src/rsz/include/rsz/*.hh", + #OpenDP + "src/dpl/include/dpl/*.h", + #finale + "src/fin/include/fin/*.h", + #TritonMP + "src/mpl/include/mpl/*.h", + #antenna_checker + "src/ant/include/ant/*.hh", + #FastRoute + "src/grt/src/fastroute/include/*.h", + "src/grt/include/grt/*.h", + #Replace + "src/gpl/include/gpl/*.h", + #TritonCTS + "src/cts/include/cts/*.h", + #Tapcell + "src/tap/include/tap/*.h", + #OpenRCX + "src/rcx/include/rcx/*.h", + #TritonRoute + "src/drt/include/triton_route/*.h", + #PDNSim + "src/psm/include/psm/*.h", + "src/psm/include/psm/*.hh", + #PartitionManager + "src/par/src/*.h", + "src/par/include/par/*.h", + #PDNGen + "src/pdn/include/pdn/*.hh", + #STT + "src/stt/include/stt/*.h", + #MPL2 + "src/mpl2/include/mpl2/*.h", + #RMP + "src/rmp/include/rmp/*.h", + #Distributed + "src/dst/include/dst/*.h", + #Dpo + "src/dpo/include/dpo/*.h", + #pad + "src/pad/include/pad/*.h", + #dft + "src/dft/include/dft/*.hh", + #upf + "src/upf/include/upf/*.h", +] + +OPENROAD_LIBRARY_INCLUDES = [ + #Root OpenRoad + "include", + #OpenDBTCL + "src/odb/src/swig/common", + #DbSTA + "src/dbSta/include", + "src/dbSta/include/db_sta", + #GUI + "src/gui/include", + #InitFp + "src/ifp/include", + #ioPlacer + "src/ppl/include", + "src/ppl/include/ppl", + "src/ppl/src", + #Resizer + "src/rsz/include", + "src/rsz/include/rsz", + "src/rsz/src", + #OpenDP + "src/dpl/src", + "src/dpl/include", + "src/dpl/include/dpl", + #finale + "src/fin/include", + "src/fin/include/fin", + #TritonMP + "src/mpl/include", + "src/mpl/include/mpl", + #antenna_checker + "src/ant/include", + "src/ant/include/ant", + #FastRoute + "src/grt/src/fastroute/include", + "src/grt/include/grt", + "src/grt/include", + "src/grt/src", + #Replace + "src/gpl/include/gpl", + "src/gpl/include", + #TritonCTS + "src/cts/src", + "src/cts/include", + #Tapcell + "src/tap/include/tap", + "src/tap/include", + #OpenRCX + "src/rcx/include/rcx", + "src/rcx/include", + #TritonRoute + "src/drt/include/triton_route", + "src/drt/src", + "src/drt/include", + #PDNSim + "src/psm/include/psm", + "src/psm/include", + #PartitionManager + "src/par/include", + "src/par/include/par", + "src/par/src/MLPart/src", + "src/par/src/MLPart/mlpart", + "src/par/src/MLPart/mlpart/ABKCommon", + #PDNGen + "src/pdn/include", + "src/pdn/include/pdn", + #MPL2 + "src/mpl2/include", + "src/mpl2/src", + #RMP + "src/rmp/include", + #STT + "src/stt/include", + "src/stt/include/stt", + "src/stt/src", + #Distributed + "src/dst/include", + "src/dst/include/dst", + #Dpo + "src/dpo/include", + "src/dpo/include/dpo", + #pad + "src/pad/include", + #utl + "src/utl/src", + #dft + "src/dft/include", + "src/dft/src/clock_domain", + "src/dft/src/config", + "src/dft/src/utils", + "src/dft/src/cells", + "src/dft/src/replace", + "src/dft/src/architect", + "src/dft/src/stitch", + #upf + "src/upf/include", +] + +OPENROAD_LIBRARY_DEPS = [ + ":ParquetFP", + ":logger", + ":munkres", + ":opendb_lib", + ":openroad_version", + ":opensta_lib", + "//util/operations_research/linear_solver:linear_solver_scip", + "//util/operations_research/linear_solver:linear_solver_wrapper", + "//util/operations_research/sat:cp_model", + "//third_party/abc:abc-lib", + "//third_party/absl/flags:flag", + "//third_party/absl/strings", + "//third_party/absl/types:span", + "//third_party/boost/do_not_include_from_google3_only_third_party/boost", + "//third_party/boost/do_not_include_from_google3_only_third_party/boost:throw_exception", + "//third_party/boost/do_not_include_from_google3_only_third_party/boost/libs/serialization", + "//third_party/boost/do_not_include_from_google3_only_third_party/boost/libs/thread", + "//third_party/eigen3", + "//third_party/lemon", + "//third_party/llvm_openmp", + "//third_party/spdlog", + "//third_party/tcl_tk:tcl", +] + +OPENROAD_LIBRARY_SRCS_EXCLUDE = [ + "src/Main.cc", + "src/Main_bindings.cc", + "src/rsz/src/Unused.cc", + "src/drt/src/main.cpp", + "src/utl/src/Logger.cpp", + "src/utl/src/Metrics.cpp", + "src/utl/src/CFileUtils.cpp", + "src/par/src/MLPart/mlpart/ABKCommon/abkrand_templ.cxx", + "src/par/src/MLPart/mlpart/Partitioners/aGreedMoveMan.cxx", + "src/par/src/MLPart/mlpart/Combi/grayPermut.cxx", +] + +OPENROAD_LIBRARY_SRCS_INCLUDE = [ + #Root OpenRoad + "src/*.cc", + "src/*.cpp", + #Utility + "src/utl/src/*.cpp", + "src/utl/src/*.h", + #InitFp + "src/ifp/src/*.cc", + #DbSTA + "src/dbSta/src/*.cc", + "src/dbSta/src/*.cpp", + "src/dbSta/src/*.hh", + "src/dbSta/src/*.h", + #ioPlacer + "src/ppl/src/*.cpp", + "src/ppl/src/*.h", + #Resizer + "src/rsz/src/*.cc", + "src/rsz/src/*.hh", + "src/rsz/src/*.h", + #OpenDP + "src/dpl/src/*.cpp", + "src/dpl/src/*.h", + #finale + "src/fin/src/*.cpp", + "src/fin/src/*.h", + #TritionMP + "src/mpl/src/*.cpp", + "src/mpl/src/*.h", + #antenna_checker + "src/ant/src/*.cc", + #FastRoute + "src/grt/src/fastroute/src/*.cpp", + "src/grt/src/fastroute/src/*.h", + "src/grt/src/*.h", + "src/grt/src/*.cpp", + #Replace + "src/gpl/src/*.cpp", + "src/gpl/src/*.h", + #TritonCTS + "src/cts/src/*.h", + "src/cts/src/*.cpp", + #Tapcell + "src/tap/src/*.cpp", + #OpenRCX + "src/rcx/src/*.cpp", + "src/rcx/src/*.h", + #TritonRoute + "src/drt/src/*.cpp", + "src/drt/src/*.h", + "src/drt/src/**/*.h", + "src/drt/src/**/*.cpp", + "src/drt/src/**/*.cc", + #PDNSim + "src/psm/src/*.cpp", + "src/psm/src/*.h", + #PartitionManager + "src/par/src/*.cpp", + "src/par/src/MLPart/mlpart/**/*.cxx", + "src/par/src/MLPart/mlpart/**/*.h", + "src/par/src/MLPart/mlpart/**/*.inl", + "src/par/src/MLPart/src/*.h", + "src/par/src/MLPart/src/*.cpp", + #PDNGen + "src/pdn/src/*.cc", + "src/pdn/src/*.cpp", + "src/pdn/src/*.h", + #STT + "src/stt/src/*.cpp", + "src/stt/src/*.h", + "src/stt/src/pdr/src/*.h", + "src/stt/src/pdr/src/*.cpp", + "src/stt/src/flt/*.cpp", + #MPL2 + "src/mpl2/src/*.cpp", + "src/mpl2/src/*.h", + #RMP + "src/rmp/src/*.cpp", + #Distributed + "src/dst/src/*.cc", + "src/dst/src/*.h", + #Dpo + "src/dpo/src/*.cpp", + "src/dpo/src/*.cxx", + "src/dpo/src/*.h", + #pad + "src/pad/src/*.cpp", + "src/pad/src/*.h", + #upf + "src/upf/src/*.cpp", + #dft + "src/dft/src/**/*.cpp", + "src/dft/src/**/*.hh", +] diff --git a/dependency_support/org_theopenroadproject/bundled.BUILD.bazel b/dependency_support/org_theopenroadproject/bundled.BUILD.bazel index b573643c..b7365dc9 100644 --- a/dependency_support/org_theopenroadproject/bundled.BUILD.bazel +++ b/dependency_support/org_theopenroadproject/bundled.BUILD.bazel @@ -12,12 +12,38 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@rules_hdl//dependency_support/org_theopenroadproject:tcl_wrap_cc.bzl", "tcl_wrap_cc") -load("@rules_hdl//dependency_support/org_theopenroadproject:tcl_encode.bzl", "tcl_encode") -load("@rules_hdl//dependency_support/com_github_westes_flex:flex.bzl", "genlex") +# load("", "py_extension") +# load("", "py_library") +load("@bazel_skylib//rules:common_settings.bzl", "string_flag") + load("@rules_hdl//dependency_support/org_gnu_bison:bison.bzl", "genyacc") +load("@rules_hdl//dependency_support/com_github_westes_flex:flex.bzl", "genlex") -package(features = ["-parse_headers"]) +load( + "@rules_hdl//dependency_support/org_theopenroadproject:build_helper.bzl", + "OPENROAD_BINARY_DEPS", + "OPENROAD_BINARY_SRCS", + "OPENROAD_BINARY_SRCS_WITHOUT_MAIN", + "OPENROAD_COPTS", + "OPENROAD_LIBRARY_DEPS", + "OPENROAD_LIBRARY_HDRS_INCLUDE", + "OPENROAD_LIBRARY_INCLUDES", + "OPENROAD_LIBRARY_SRCS_EXCLUDE", + "OPENROAD_LIBRARY_SRCS_INCLUDE", +) +load("@rules_hdl//dependency_support/org_theopenroadproject:tcl_encode.bzl", "tcl_encode") +load("@rules_hdl//dependency_support/com_justbuchanan_rules_qt//:qt.bzl", "qt_cc_library", "qt_ui_library", "qt_resource") + +load("@rules_hdl//dependency_support/org_theopenroadproject:tcl_wrap_cc.bzl", "tcl_wrap_cc") + +package( + features = [ + "-parse_headers", + "-layering_check", + # TODO(b/299593765): Fix strict ordering. + "-libcxx_strict_weak_ordering_check", + ], +) # OpenRoad Physical Synthesis licenses(["restricted"]) @@ -27,393 +53,247 @@ exports_files([ "src/sta/etc/TclEncode.tcl", ]) +string_flag( + name = "platform", + build_setting_default = "cli", + values = [ + "cli", + "headless", + "native", + ], +) + +config_setting( + name = "platform_cli", + flag_values = { + ":platform": "cli", + }, +) + +config_setting( + name = "platform_headless", + flag_values = { + ":platform": "headless", + }, +) + +# For interactive use with GUI functionality +# bazel run --//XXXXXXXXXXX/open_road:platform=native //XXXXXXXXXXX/open_road:openroad -- -gui +config_setting( + name = "platform_native", + flag_values = { + ":platform": "native", + }, +) + cc_binary( name = "openroad", - srcs = [ - #Root OpenRoad - "src/Main.cc", - ":openroad_swig", - ":openroad_tcl", - #Utility - ":logger_swig", - #InitFp - ":init_floorplan_swig", - ":init_floorplan_tcl", - #OpenDB - ":opendb_tcl", - ":opendb_tcl_common", - #DbSTA - ":db_sta_tcl", - ":dbsta_swig", - #ioPlacer - ":ioplacer_tcl", - ":ioplacer_swig", - #Resizer - ":resizer_swig", - ":resizer_tcl", - #OpenDP - ":opendp_swig", - ":opendp_tcl", - #finale - ":finale_swig", - ":finale_tcl", - #TritionMP - ":tritonmp_swig", - ":tritonmp_tcl", - #antenna_checker - ":ant_swig", - ":ant_tcl", - #FastRoute - ":fastroute_swig", - ":fastroute_tcl", - #Replace - ":replace_swig", - ":replace_tcl", - #TritonCTS - ":triton_cts_tcl", - ":triton_cts_swig", - #Tapcell - ":tapcell_swig", - ":tapcell_tcl", - #OpenRCX - ":rcx_swig", - ":rcx_tcl", - #TritonRoute - ":triton_route_swig", - ":triton_route_tcl", - #PDNSim - ":pdn_sim_swig", - ":pdn_sim_tcl", - #PartitionManager - ":partition_manager_swig", - ":partition_manager_tcl", - #PDNGen - ":pdngen_tcl", - ":pdngen_swig", - #MPL2 - ":mpl2_swig", - ":mpl2_tcl", - #RMP - ":rmp_swig", - ":rmp_tcl", - #STT - ":stt_swig", - ":stt_tcl", - #Distributed - ":dst_swig", - ":dst_tcl", - #Dpo - ":dpo_swig", - ":dpo_tcl", - ], - copts = [ - "-fexceptions", - "-Wno-error", - "-Wall", - "-Wextra", - "-pedantic", - "-Wcast-qual", - "-Wredundant-decls", - "-Wformat-security", - "-fopenmp" - ], + srcs = OPENROAD_BINARY_SRCS + select({ + ":platform_cli": [], + ":platform_headless": [ + #GUI + ":gui_swig", + ":gui_tcl", + ], + ":platform_native": [ + #GUI + ":gui_swig", + ":gui_tcl", + ], + }), + copts = OPENROAD_COPTS, features = ["-use_header_modules"], + linkopts = select({ + ":platform_cli": [], + ":platform_headless": [], + ":platform_native": [ + # These linkopts are workarounds to allow GUI to launch on local linux + # maybe at some point this will be fixed. + # Something to do with GLIBC 2.33 + "-Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2", + "-Wl,-rpath=/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu", + ], + }), visibility = ["//visibility:public"], - deps = [ - ":logger", - ":opendb_lib", - ":openroad_lib", - ":openroad_version", - ":opensta_lib", - "@tk_tcl//:tcl", - "@boost//:stacktrace", - ], + deps = OPENROAD_BINARY_DEPS + select({ + ":platform_cli": [":openroad_lib_private"], + ":platform_headless": [ + ":openroad_gui_lib_headless", + ":qt_resources", + ], + ":platform_native": [ + ":openroad_gui_lib_native", + ":qt_resources", + ], + }), ) cc_library( - name = "openroad_lib", + name = "openroad_lib_private", srcs = glob( - include = [ - #Root OpenRoad - "src/*.cc", - "src/*.cpp", - #Utility - "src/utl/src/*.cpp", - #InitFp - "src/ifp/src/*.cc", + include = OPENROAD_LIBRARY_SRCS_INCLUDE + [ #GUI Disabled "src/gui/src/stub.cpp", "src/gui/src/stub_heatMap.cpp", - #DbSTA - "src/dbSta/src/*.cc", - "src/dbSta/src/*.cpp", - "src/dbSta/src/*.hh", - "src/dbSta/src/*.h", - #ioPlacer - "src/ppl/src/*.cpp", - "src/ppl/src/*.h", - #Resizer - "src/rsz/src/*.cc", - "src/rsz/src/*.hh", - #OpenDP - "src/dpl/src/*.cpp", - "src/dpl/src/*.h", - #finale - "src/fin/src/*.cpp", - "src/fin/src/*.h", - #TritionMP - "src/mpl/src/*.cpp", - "src/mpl/src/*.h", - #antenna_checker - "src/ant/src/*.cc", - #FastRoute - "src/grt/src/fastroute/src/*.cpp", - "src/grt/src/fastroute/src/*.h", - "src/grt/src/*.h", - "src/grt/src/*.cpp", - #Replace - "src/gpl/src/*.cpp", - "src/gpl/src/*.h", - #TritonCTS - "src/cts/src/*.h", - "src/cts/src/*.cpp", - #Tapcell - "src/tap/src/*.cpp", - #OpenRCX - "src/rcx/src/*.cpp", - #TritonRoute - "src/drt/src/*.cpp", - "src/drt/src/*.h", - "src/drt/src/**/*.h", - "src/drt/src/**/*.cpp", - "src/drt/src/**/*.cc", - #PDNSim - "src/psm/src/*.cpp", - "src/psm/src/*.h", - #PartitionManager - "src/par/src/*.cpp", - "src/par/src/MLPart/mlpart/**/*.cxx", - "src/par/src/MLPart/mlpart/**/*.h", - "src/par/src/MLPart/mlpart/**/*.inl", - "src/par/src/MLPart/src/*.h", - "src/par/src/MLPart/src/*.cpp", - #PDNGen - "src/pdn/src/*.cc", - "src/pdn/src/*.cpp", - "src/pdn/src/*.h", - #STT - "src/stt/src/*.cpp", - "src/stt/src/pdr/src/*.h", - "src/stt/src/pdr/src/*.cpp", - "src/stt/src/flt/*.cpp", - #MPL2 - "src/mpl2/src/*.cpp", - "src/mpl2/src/*.h", - #RMP - "src/rmp/src/*.cpp", - #Distributed - "src/dst/src/*.cc", - "src/dst/src/*.h", - #Dpo - "src/dpo/src/*.cpp", - "src/dpo/src/*.cxx", - "src/dpo/src/*.h", ], + exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE, + ) + [ + "src/stt/src/flt/etc/POST9.cpp", + "src/stt/src/flt/etc/POWV9.cpp", + ], + hdrs = glob( + include = OPENROAD_LIBRARY_HDRS_INCLUDE, exclude = [ - "src/Main.cc", - "src/rsz/src/Unused.cc", - "src/drt/src/main.cpp", - "src/utl/src/Logger.cpp", - "src/par/src/MLPart/mlpart/ABKCommon/abkrand_templ.cxx", - "src/par/src/MLPart/mlpart/Partitioners/aGreedMoveMan.cxx", - "src/par/src/MLPart/mlpart/Combi/grayPermut.cxx", + "src/utl/include/utl/Logger.h", + "src/utl/include/utl/CFileUtils.h", + ], + ), + copts = OPENROAD_COPTS, + defines = [ + "OPENROAD_GIT_DESCRIBE=\\\"bazel_rules_hdl\\\"", + "ENABLE_MPL2", + ], + features = ["-use_header_modules"], + includes = OPENROAD_LIBRARY_INCLUDES, + deps = OPENROAD_LIBRARY_DEPS, +) + +cc_library( + name = "openroad_lib", + srcs = OPENROAD_BINARY_SRCS_WITHOUT_MAIN + glob( + include = OPENROAD_LIBRARY_SRCS_INCLUDE + [ + #GUI Disabled + "src/gui/src/stub.cpp", + "src/gui/src/stub_heatMap.cpp", ], + exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE, ) + [ + "src/Main_bindings.cc", "src/stt/src/flt/etc/POST9.cpp", "src/stt/src/flt/etc/POWV9.cpp", ], - textual_hdrs = [ - "src/par/src/MLPart/mlpart/ABKCommon/abkrand_templ.cxx", - "src/par/src/MLPart/mlpart/Partitioners/aGreedMoveMan.cxx", - ], hdrs = glob( - include = [ - #Root OpenRoad - "include/ord/*.h", - "include/ord/*.hh", - #Utility - "src/utl/include/utl/*.h", - #InitFp - "src/ifp/include/ifp/*.hh", + include = OPENROAD_LIBRARY_HDRS_INCLUDE, + exclude = [ + "src/utl/include/utl/Logger.h", + "src/utl/include/utl/CFileUtils.h", + ], + ), + copts = OPENROAD_COPTS, + defines = [ + "OPENROAD_GIT_DESCRIBE=\\\"bazel_rules_hdl\\\"", + "ENABLE_MPL2", + ], + features = ["-use_header_modules"], + includes = OPENROAD_LIBRARY_INCLUDES, + visibility = ["//visibility:public"], + deps = OPENROAD_LIBRARY_DEPS, +) + +qt_cc_library( + name = "openroad_gui_lib_headless", + srcs = glob( + include = OPENROAD_LIBRARY_SRCS_INCLUDE + glob([ #GUI - "src/gui/include/gui/*.h", - #DbSTA - "src/dbSta/include/db_sta/*.hh", - #ioPlacer - "src/ppl/include/ppl/*.h", - #Resizer - "src/rsz/include/rsz/*.hh", - #OpenDP - "src/dpl/include/dpl/*.h", - #finale - "src/fin/include/fin/*.h", - #TritonMP - "src/mpl/include/mpl/*.h", - #antenna_checker - "src/ant/include/ant/*.hh", - #FastRoute - "src/grt/src/fastroute/include/*.h", - "src/grt/include/grt/*.h", - #Replace - "src/gpl/include/gpl/*.h", - #TritonCTS - "src/cts/include/cts/*.h", - #Tapcell - "src/tap/include/tap/*.h", - #OpenRCX - "src/rcx/include/rcx/*.h", - #TritonRoute - "src/drt/include/triton_route/*.h", - #PDNSim - "src/psm/include/psm/*.h", - "src/psm/include/psm/*.hh", - #PartitionManager - "src/par/src/*.h", - "src/par/include/par/*.h", - #PDNGen - "src/pdn/include/pdn/*.hh", - #STT - "src/stt/include/stt/*.h", - #MPL2 - "src/mpl2/include/mpl2/*.h", - #RMP - "src/rmp/include/rmp/*.h", - #Distributed - "src/dst/include/dst/*.h", - #Dpo - "src/dpo/include/dpo/*.h", + "src/gui/src/*.cpp", + #"src/gui/src/*.h", + ]), + exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE + [ + #GUI Disabled + "src/gui/src/stub.cpp", + "src/gui/src/stub_heatMap.cpp", ], + ) + [ + "src/stt/src/flt/etc/POST9.cpp", + "src/stt/src/flt/etc/POWV9.cpp", + ":gui_swig", + ], + hdrs = glob( + include = OPENROAD_LIBRARY_HDRS_INCLUDE, exclude = [ "src/utl/include/utl/Logger.h", ], ), - copts = [ - "-fexceptions", - "-Wno-error", - "-Wall", - "-Wextra", - "-pedantic", - "-Wcast-qual", - "-Wredundant-decls", - "-Wformat-security", - "-Iexternal/com_github_quantamhd_lemon", + copts = OPENROAD_COPTS, + defines = [ + "OPENROAD_GIT_DESCRIBE=\\\"bazel_rules_hdl\\\"", ], features = ["-use_header_modules"], - includes = [ - #Root OpenRoad - "include", - #OpenDBTCL - "src/odb/src/swig/common", - #DbSTA - "src/dbSta/include", - "src/dbSta/include/db_sta", - #GUI - "src/gui/include", - #InitFp - "src/ifp/include", - #ioPlacer - "src/ppl/include", - "src/ppl/include/ppl", - "src/ppl/src", - #Resizer - "src/rsz/include", - "src/rsz/include/rsz", - #OpenDP - "src/dpl/include", - "src/dpl/include/dpl", - #finale - "src/fin/include", - "src/fin/include/fin", - #TritonMP - "src/mpl/include", - "src/mpl/include/mpl", - #antenna_checker - "src/ant/include", - "src/ant/include/ant", - #FastRoute - "src/grt/src/fastroute/include", - "src/grt/include/grt", - "src/grt/include", - #Replace - "src/gpl/include/gpl", - "src/gpl/include", - #TritonCTS - "src/cts/src", - "src/cts/include", - #Tapcell - "src/tap/include/tap", - "src/tap/include", - #OpenRCX - "src/rcx/include/rcx", - "src/rcx/include", - #TritonRoute - "src/drt/include/triton_route", - "src/drt/src", - "src/drt/include", - #PDNSim - "src/psm/include/psm", - "src/psm/include", - #PartitionManager - "src/par/include", - "src/par/include/par", - "src/par/src/MLPart/src", - "src/par/src/MLPart/mlpart", - "src/par/src/MLPart/mlpart/ABKCommon", - #PDNGen - "src/pdn/include", - "src/pdn/include/pdn", - #MPL2 - "src/mpl2/include", - #RMP - "src/rmp/include", - #STT - "src/stt/include", - "src/stt/include/stt", - #Distributed - "src/dst/include", - "src/dst/include/dst", - #Dpo - "src/dpo/include", - "src/dpo/include/dpo", + includes = OPENROAD_LIBRARY_INCLUDES + [ + "src/gui/src", + "src/gui/ui", + ], + moc_hdrs = glob([ + "src/gui/src/*.h", + ]), + qt_gui_platform = "headless", + deps = OPENROAD_LIBRARY_DEPS + [ + ":qt_resources", + ":qt_ui", + "//third_party/qt:charts", ], +) + +qt_cc_library( + name = "openroad_gui_lib_native", + srcs = glob( + include = OPENROAD_LIBRARY_SRCS_INCLUDE + glob([ + #GUI + "src/gui/src/*.cpp", + #"src/gui/src/*.h", + ]), + exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE + [ + #GUI Disabled + "src/gui/src/stub.cpp", + "src/gui/src/stub_heatMap.cpp", + ], + ) + [ + "src/stt/src/flt/etc/POST9.cpp", + "src/stt/src/flt/etc/POWV9.cpp", + ":gui_swig", + ], + hdrs = glob( + include = OPENROAD_LIBRARY_HDRS_INCLUDE, + exclude = [ + "src/utl/include/utl/Logger.h", + ], + ), + copts = OPENROAD_COPTS, defines = [ - "OPENROAD_GIT_DESCRIBE=\\\"bazel_rules_hdl\\\"" + "OPENROAD_GIT_DESCRIBE=\\\"bazel_rules_hdl\\\"", ], - linkstatic = True, - deps = [ - ":ParquetFP", - ":logger", - ":munkres", - ":opendb_lib", - ":openroad_version", - ":opensta_lib", - "@boost//:geometry", - "@boost//:multi_array", - "@boost//:property_tree", - "@boost//:icl", - "@boost//:polygon", - "@boost//:graph", - "@boost//:asio", - "@boost//:stacktrace", - "@boost//:thread", - "@edu_berkeley_abc//:abc-lib", - "@org_tuxfamily_eigen//:eigen3", - "@com_github_quantamhd_lemon//:lemon", - "@com_github_gabime_spdlog//:spdlog", - "@tk_tcl//:tcl", - "@org_llvm_openmp//:openmp", + features = ["-use_header_modules"], + includes = OPENROAD_LIBRARY_INCLUDES + [ + "src/gui/src", + "src/gui/ui", + ], + moc_hdrs = glob([ + "src/gui/src/*.h", + ]), + qt_gui_platform = "native", + deps = OPENROAD_LIBRARY_DEPS + [ + ":qt_resources", + ":qt_ui", + "//third_party/qt:charts", + ], +) + +qt_ui_library( + name = "qt_ui", + uic_srcs = glob([ + "src/gui/ui/*.ui", + ]), +) + +qt_resource( + name = "qt_resources", + data_srcs = glob([ + "src/gui/resources/**/*.png", + ]), + external_init_name = "resource", + qrc_srcs = [ + "src/gui/resources/resource.qrc", ], - alwayslink = True, ) genrule( @@ -449,17 +329,22 @@ cc_library( "src/utl/include/utl/Metrics.h", ], copts = [ + "-fexceptions", "-Wno-error", "-Wall", "-Wextra", "-pedantic", - "-Wcast-qual", + "-Wno-cast-qual", # typically from TCL swigging "-Wredundant-decls", "-Wformat-security", + "-Wno-unused-parameter", + "-Wno-sign-compare", ], + features = ["-use_header_modules"], includes = [ "src/utl/include", "src/utl/include/utl", + "src/utl/src", ], visibility = ["@org_theopenroadproject//:__subpackages__"], deps = [ @@ -482,9 +367,11 @@ cc_library( "-Wall", "-Wextra", "-pedantic", - "-Wcast-qual", + "-Wno-cast-qual", # typically from TCL swigging "-Wredundant-decls", "-Wformat-security", + "-Wno-unused-parameter", + "-Wno-sign-compare", ], features = ["-use_header_modules"], includes = [ @@ -662,7 +549,6 @@ tcl_encode( tcl_encode( name = "pdngen_tcl", srcs = [ - "src/pdn/src/PdnGen.tcl", "src/pdn/src/pdn.tcl", ], char_array_name = "pdn_tcl_inits", @@ -672,11 +558,18 @@ tcl_encode( name = "openroad_tcl", srcs = [":tcl_util"] + [ "src/OpenRoad.tcl", - "src/pad/src/pad.tcl", ], char_array_name = "openroad_swig_tcl_inits", ) +tcl_encode( + name = "pad_tcl", + srcs = [ + "src/pad/src/pad.tcl", + ], + char_array_name = "pad_tcl_inits", +) + tcl_encode( name = "mpl2_tcl", srcs = [ @@ -717,6 +610,30 @@ tcl_encode( char_array_name = "dpo_tcl_inits", ) +tcl_encode( + name = "gui_tcl", + srcs = [ + "src/gui/src/gui.tcl", + ], + char_array_name = "gui_tcl_inits", +) + +tcl_encode( + name = "upf_tcl", + srcs = [ + "src/upf/src/upf.tcl", + ], + char_array_name = "upf_tcl_inits", +) + +tcl_encode( + name = "dft_tcl", + srcs = [ + "src/dft/src/dft.tcl", + ], + char_array_name = "dft_tcl_inits", +) + tcl_wrap_cc( name = "dst_swig", srcs = [ @@ -736,12 +653,17 @@ tcl_wrap_cc( srcs = [ "src/ifp/src/InitFloorplan.i", ":error_swig", - ], + ] + glob([ + "src/odb/src/swig/tcl/*.i", + "src/odb/src/swig/common/*.i", + ]), module = "ifp", namespace_prefix = "ifp", root_swig_src = "src/ifp/src/InitFloorplan.i", swig_includes = [ "src/ifp/src", + "src/odb/src/swig/common", + "src/odb/src/swig/tcl", ], ) @@ -756,8 +678,8 @@ tcl_wrap_cc( namespace_prefix = "sta", root_swig_src = "src/dbSta/src/dbSta.i", swig_includes = [ - "src/odb/src/swig/common", "src/dbSta/src", + "src/odb/src/swig/common", "src/sta", ], deps = [ @@ -811,6 +733,7 @@ tcl_wrap_cc( name = "logger_swig", srcs = [ "src/utl/src/Logger.i", + "src/utl/src/LoggerCommon.h", ":error_swig", ], module = "utl", @@ -910,11 +833,17 @@ tcl_wrap_cc( srcs = [ "src/tap/src/tapcell.i", ":error_swig", - ], + ] + glob([ + "src/odb/src/swig/tcl/*.i", + "src/odb/src/swig/common/*.i", + "src/odb/include/odb/*.h", + ]), module = "tap", namespace_prefix = "tap", root_swig_src = "src/tap/src/tapcell.i", swig_includes = [ + "src/odb/src/swig/common", + "src/odb/src/swig/tcl", "src/tap/src", ], ) @@ -1009,6 +938,27 @@ tcl_wrap_cc( ], ) +tcl_wrap_cc( + name = "pad_swig", + srcs = [ + "src/pad/src/pad.i", + ":error_swig", + ] + glob([ + "src/odb/src/swig/tcl/*.i", + "src/odb/src/swig/common/*.i", + "src/odb/include/odb/*.h", + ]), + module = "pad", + namespace_prefix = "pad", + root_swig_src = "src/pad/src/pad.i", + swig_includes = [ + "src/odb/include", + "src/odb/src/swig/common", + "src/odb/src/swig/tcl", + "src/pad/src", + ], +) + tcl_wrap_cc( name = "mpl2_swig", srcs = [ @@ -1065,6 +1015,35 @@ tcl_wrap_cc( ], ) +tcl_wrap_cc( + name = "dft_swig", + srcs = [ + "src/dft/src/dft.i", + ":error_swig", + ], + module = "dft", + namespace_prefix = "dft", + root_swig_src = "src/dft/src/dft.i", + swig_includes = [ + "src/dft/src", + ], +) + +tcl_wrap_cc( + name = "gui_swig", + srcs = [ + "src/gui/src/gui.i", + ":error_swig", + ], + module = "gui", + namespace_prefix = "gui", + root_swig_src = "src/gui/src/gui.i", + runtime_header = "src/gui/src/tclSwig.h", + swig_includes = [ + "src/gui/src", + ], +) + filegroup( name = "error_swig", srcs = [ @@ -1096,12 +1075,12 @@ tcl_wrap_cc( "src/odb/src/swig/tcl/*.i", "src/odb/src/swig/common/*.i", "src/odb/include/odb/*.h", - ]), + ]) + ["src/Exception.i"], module = "odbtcl", namespace_prefix = "odb", root_swig_src = "src/odb/src/swig/common/odb.i", swig_includes = [ - "src/odb/include", + "src/odb/include", "src/odb/include/odb", "src/odb/src/swig/tcl", ], @@ -1114,6 +1093,23 @@ tcl_wrap_cc( ], ) +tcl_wrap_cc( + name = "upf_swig", + srcs = glob([ + "src/odb/include/odb/*.h", + "src/upf/include/upf/*.h", + ]) + [ + "src/upf/src/upf.i", + ], + module = "upf", + namespace_prefix = "upf", + root_swig_src = "src/upf/src/upf.i", + swig_includes = [ + "src/odb/include", + "src/upf/include", + ], +) + cc_library( name = "opendb_lib", srcs = glob([ @@ -1138,8 +1134,8 @@ cc_library( "src/odb/include/odb/*.hpp", ]) + [ "src/odb/src/def/def/defiAlias.hpp", - "src/odb/src/def/def/defwWriter.hpp", "src/odb/src/def/def/defrReader.hpp", + "src/odb/src/def/def/defwWriter.hpp", "src/odb/src/lef/lef/lefiDebug.hpp", "src/odb/src/lef/lef/lefiUtil.hpp", "src/odb/src/lef/lef/lefrReader.hpp", @@ -1149,7 +1145,7 @@ cc_library( "-Wno-error", ], features = [ - "-use_header_modules", + "-use_header_modules", ], includes = [ "src/odb/include", @@ -1166,9 +1162,6 @@ cc_library( ":logger", ":opendb_def", ":opendb_lef", - "@com_github_gabime_spdlog//:spdlog_with_exceptions", - "@tk_tcl//:tcl", - "@net_zlib//:zlib", "@boost//:iostreams", "@boost//:foreach", "@boost//:variant", @@ -1178,6 +1171,9 @@ cc_library( "@boost//:bind", "@boost//:algorithm", "@boost//:thread", + "@com_github_gabime_spdlog//:spdlog_with_exceptions", + "@tk_tcl//:tcl", + "@net_zlib//:zlib", ], ) @@ -1196,12 +1192,12 @@ cc_library( "src/odb/src/lef/lef/lefrReader.hpp", ], ) + [ - "src/odb/src/lef/lef/lef_parser.hpp", "src/odb/src/lef/lef/lef_parser.cpp", + "src/odb/src/lef/lef/lef_parser.hpp", ], hdrs = glob([ - "src/odb/include/opendb/*.h", - "src/odb/include/opendb/*.hpp", + "src/odb/include/odb/*.h", + "src/odb/include/odb/*.hpp", ]) + [ "src/odb/src/lef/lef/lefiDebug.hpp", "src/odb/src/lef/lef/lefiUtil.hpp", @@ -1214,11 +1210,13 @@ cc_library( ], features = ["-use_header_modules"], includes = [ - "src/odb/include/opendb", + "src/odb/include/odb", "src/odb/src/lef/lef", "src/odb/src/lef/lefzlib", ], - visibility = ["//visibility:private"], + visibility = [ + "//visibility:private", + ], deps = [ "@net_zlib//:zlib", ], @@ -1239,18 +1237,18 @@ cc_library( "src/odb/src/def/def/defiUtil.hpp", ], ) + [ - "src/odb/src/def/def/def_parser.hpp", "src/odb/src/def/def/def_parser.cpp", + "src/odb/src/def/def/def_parser.hpp", ], hdrs = glob([ - "src/odb/include/opendb/*.h", - "src/odb/include/opendb/*.hpp", + "src/odb/include/odb/*.h", + "src/odb/include/odb/*.hpp", ]) + [ + "src/odb/src/def/def/defiAlias.hpp", "src/odb/src/def/def/defiComponent.hpp", "src/odb/src/def/def/defiUtil.hpp", - "src/odb/src/def/def/defiAlias.hpp", - "src/odb/src/def/def/defwWriter.hpp", "src/odb/src/def/def/defrReader.hpp", + "src/odb/src/def/def/defwWriter.hpp", "src/odb/src/def/defzlib/defzlib.hpp", ], copts = [ @@ -1259,11 +1257,13 @@ cc_library( ], features = ["-use_header_modules"], includes = [ - "src/odb/include/opendb", + "src/odb/include/odb", "src/odb/src/def/def", "src/odb/src/def/defzlib", ], - visibility = ["//visibility:private"], + visibility = [ + "//visibility:private", + ], deps = [ "@net_zlib//:zlib", ], @@ -1369,46 +1369,55 @@ genyacc( # The order here is very important as the script to encode these relies on it tcl_srcs = [ + "src/sta/tcl/Init.tcl", "src/sta/tcl/Util.tcl", + "src/sta/tcl/CmdArgs.tcl", + "src/sta/tcl/CmdUtil.tcl", "src/sta/tcl/Graph.tcl", "src/sta/tcl/Liberty.tcl", "src/sta/tcl/Link.tcl", "src/sta/tcl/Network.tcl", "src/sta/tcl/NetworkEdit.tcl", + "src/sta/tcl/Property.tcl", "src/sta/tcl/Sdc.tcl", "src/sta/tcl/Search.tcl", - "src/sta/tcl/Cmds.tcl", - "src/sta/tcl/Variables.tcl", "src/sta/tcl/Sta.tcl", - "src/sta/tcl/Power.tcl", + "src/sta/tcl/Variables.tcl", + "src/sta/tcl/WritePathSpice.tcl", "src/sta/tcl/Splash.tcl", "src/sta/dcalc/DelayCalc.tcl", "src/sta/parasitics/Parasitics.tcl", + "src/sta/power/Power.tcl", "src/sta/sdf/Sdf.tcl", "src/sta/verilog/Verilog.tcl", ] exported_tcl = [ + "src/sta/dcalc/DelayCalc.tcl", + "src/sta/parasitics/Parasitics.tcl", + "src/sta/power/Power.tcl", + "src/sta/sdf/Sdf.tcl", + "src/sta/tcl/CmdArgs.tcl", + "src/sta/tcl/CmdUtil.tcl", "src/sta/tcl/Graph.tcl", "src/sta/tcl/Liberty.tcl", "src/sta/tcl/Network.tcl", "src/sta/tcl/NetworkEdit.tcl", + "src/sta/tcl/Property.tcl", "src/sta/tcl/Sdc.tcl", "src/sta/tcl/Search.tcl", - "src/sta/tcl/Cmds.tcl", - "src/sta/tcl/Variables.tcl", - "src/sta/tcl/Sta.tcl", - "src/sta/tcl/Power.tcl", "src/sta/tcl/Splash.tcl", - "src/sta/dcalc/DelayCalc.tcl", - "src/sta/parasitics/Parasitics.tcl", - "src/sta/sdf/Sdf.tcl", + "src/sta/tcl/Sta.tcl", + "src/sta/tcl/Variables.tcl", + "src/sta/tcl/WritePathSpice.tcl", ] filegroup( name = "tcl_scripts", srcs = exported_tcl, - visibility = ["@org_theopenroadproject//:__subpackages__"], + visibility = [ + "@org_theopenroadproject//:__subpackages__", + ], ) tcl_encode( @@ -1425,7 +1434,8 @@ genrule( #define STA_VERSION "2.2.1" #define STA_GIT_SHA1 "53d4d57cb8550d2ceed18adad75b73bba7858f4f" #define CUDD 0 - #define SSTA 0' > \"$@\" + #define SSTA 0 + #define ZLIB_FOUND' > \"$@\" """, ) @@ -1435,6 +1445,7 @@ filegroup( "src/sta/app/StaApp.i", "src/sta/dcalc/DelayCalc.i", "src/sta/parasitics/Parasitics.i", + "src/sta/power/Power.i", "src/sta/sdf/Sdf.i", "src/sta/tcl/Exception.i", "src/sta/tcl/NetworkEdit.i", @@ -1454,6 +1465,7 @@ tcl_wrap_cc( swig_includes = [ "src/sta/dcalc", "src/sta/parasitics", + "src/sta/power", "src/sta/sdf", "src/sta/tcl", "src/sta/verilog", @@ -1504,9 +1516,11 @@ cc_binary( "-Wall", "-Wextra", "-pedantic", - "-Wcast-qual", + "-Wno-cast-qual", # typically from TCL swigging "-Wredundant-decls", "-Wformat-security", + "-Wno-unused-parameter", + "-Wno-sign-compare", ], features = ["-use_header_modules"], includes = [ @@ -1515,11 +1529,11 @@ cc_binary( "src/sta/include/sta", "src/sta/util", ], + visibility = ["//visibility:public"], deps = [ ":opensta_lib", "@tk_tcl//:tcl", ], - visibility = ["//visibility:public"], ) cc_library( @@ -1533,6 +1547,7 @@ cc_library( "src/sta/sdf/*.hh", "src/sta/search/*.hh", "src/sta/verilog/*.hh", + "src/sta/power/*.hh", ]) + glob( include = [ "src/sta/app/StaMain.cc", @@ -1546,6 +1561,7 @@ cc_library( "src/sta/sdf/*.cc", "src/sta/search/*.cc", "src/sta/verilog/*.cc", + "src/sta/power/*.cc", ], exclude = [ "src/sta/search/WriteSpice.cc", @@ -1554,8 +1570,8 @@ cc_library( "src/sta/util/Machine*.cc", ], ) + [ - ":StaConfig", "src/sta/util/Machine.cc", + ":StaConfig", ], hdrs = glob( include = ["src/sta/include/sta/*.hh"], @@ -1568,9 +1584,11 @@ cc_library( "-Wall", "-Wextra", "-pedantic", - "-Wcast-qual", + "-Wno-cast-qual", # typically from TCL swigging "-Wredundant-decls", "-Wformat-security", + "-Wno-unused-parameter", + "-Wno-sign-compare", ], features = [ "-use_header_modules", @@ -1585,6 +1603,7 @@ cc_library( visibility = ["@org_theopenroadproject//:__subpackages__"], deps = [ "@tk_tcl//:tcl", + "@net_zlib//:zlib", ], )