From b236cca4bcdc5deb06b4d076fdfb617c25762471 Mon Sep 17 00:00:00 2001 From: Tim Ansell Date: Tue, 19 Sep 2023 16:49:21 -0700 Subject: [PATCH] Update OpenROAD version. Signed-off-by: Tim 'mithro' Ansell --- ...01-logging-change-to-support-silence.patch | 144 ++-- .../0002-ortools-quotes.patch | 53 ++ .../org_theopenroadproject/build_helper.bzl | 414 +++++++++++ .../bundled.BUILD.bazel | 682 +++++++----------- .../org_theopenroadproject.bzl | 9 +- 5 files changed, 799 insertions(+), 503 deletions(-) create mode 100644 dependency_support/org_theopenroadproject/0002-ortools-quotes.patch create mode 100644 dependency_support/org_theopenroadproject/build_helper.bzl diff --git a/dependency_support/org_theopenroadproject/0001-logging-change-to-support-silence.patch b/dependency_support/org_theopenroadproject/0001-logging-change-to-support-silence.patch index f1a5748e..889af621 100644 --- a/dependency_support/org_theopenroadproject/0001-logging-change-to-support-silence.patch +++ b/dependency_support/org_theopenroadproject/0001-logging-change-to-support-silence.patch @@ -1,17 +1,17 @@ diff --git a/src/Main.cc b/src/Main.cc -index c0167bf7d..4e33b7636 100755 +index 4285d3850..638690e9c 100644 --- a/src/Main.cc +++ b/src/Main.cc -@@ -89,6 +89,8 @@ int cmd_argc; - char **cmd_argv; +@@ -124,6 +124,8 @@ int cmd_argc; + char** cmd_argv; const char* log_filename = nullptr; const char* metrics_filename = nullptr; +bool quiet_logs = false; +bool silent_logs = false; - static const char *init_filename = ".openroad"; + static const char* init_filename = ".openroad"; -@@ -195,6 +197,14 @@ main(int argc, +@@ -262,6 +264,14 @@ int main(int argc, char* argv[]) remove(metrics_filename); } @@ -26,37 +26,20 @@ index c0167bf7d..4e33b7636 100755 cmd_argc = argc; cmd_argv = argv; #ifdef ENABLE_PYTHON3 -@@ -232,6 +242,7 @@ main(int argc, - } - #endif - -+ - // Set argc to 1 so Tcl_Main doesn't source any files. - // Tcl_Main never returns. - Tcl_Main(1, argv, ord::tclAppInit); -@@ -385,7 +396,7 @@ ord::tclAppInit(Tcl_Interp *interp) - static void - showUsage(const char *prog, const char *init_filename) - { -- printf("Usage: %s [-help] [-version] [-no_init] [-exit] [-gui] [-threads count|max] [-log file_name] cmd_file\n", prog); -+ printf("Usage: %s [-help] [-version] [-no_init] [-exit] [-gui] [-threads count|max] [-log file_name] [-silent] [-quiet] cmd_file\n", prog); - printf(" -help show help and exit\n"); - printf(" -version show version and exit\n"); - printf(" -no_init do not read %s init file\n", init_filename); -@@ -397,6 +408,8 @@ showUsage(const char *prog, const char *init_filename) - printf(" -python start with python interpreter [limited to db operations]\n"); - #endif - printf(" -log write a log in \n"); +@@ -485,6 +495,8 @@ static void showUsage(const char* prog, const char* init_filename) + printf(" -log write a log in \n"); + printf( + " -metrics write metrics in in JSON format\n"); + printf(" -quiet only emit warnings and above to the console\n"); + printf(" -silent do not emit logs to console.\n"); - printf(" cmd_file source cmd_file\n"); + printf(" cmd_file source cmd_file\n"); } diff --git a/src/OpenRoad.cc b/src/OpenRoad.cc -index d5e1a6ed9..01e023493 100755 +index 519c7a9e4..833bb0fef 100644 --- a/src/OpenRoad.cc +++ b/src/OpenRoad.cc -@@ -98,6 +98,8 @@ extern int Odbtcl_Init(Tcl_Interp *interp); +@@ -103,6 +103,8 @@ extern int Upf_Init(Tcl_Interp* interp); // Main.cc set by main() extern const char* log_filename; extern const char* metrics_filename; @@ -65,7 +48,7 @@ index d5e1a6ed9..01e023493 100755 namespace ord { -@@ -204,7 +206,7 @@ OpenRoad::init(Tcl_Interp *tcl_interp) +@@ -182,7 +184,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp) tcl_interp_ = tcl_interp; // Make components. @@ -75,11 +58,11 @@ index d5e1a6ed9..01e023493 100755 sta_ = makeDbSta(); verilog_network_ = makeDbVerilogNetwork(); diff --git a/src/utl/include/utl/Logger.h b/src/utl/include/utl/Logger.h -index de27099ce..989cc2b79 100644 +index c96abbe49..0f8511944 100644 --- a/src/utl/include/utl/Logger.h +++ b/src/utl/include/utl/Logger.h -@@ -95,12 +95,22 @@ enum ToolId - SIZE // the number of tools, do not put anything after this +@@ -104,19 +104,33 @@ enum ToolId + SIZE // the number of tools, do not put anything after this }; +enum LogMode { @@ -87,38 +70,34 @@ index de27099ce..989cc2b79 100644 + QUIET, + SILENT, +}; ++ + class Logger { public: // Use nullptr if messages or metrics are not logged to a file. -- Logger(const char* filename = nullptr, -- const char *metrics_filename = nullptr); -+ // Passing in true for quiet_logs will set the log level of stdout to warning -+ // and above. -+ // -+ // Passing in true for silent_logs will disable stdout logging. -+ Logger(const char* filename = nullptr, const char* metrics_filename = nullptr, + Logger(const char* filename = nullptr, +- const char* metrics_filename = nullptr); ++ const char* metrics_filename = nullptr, + const bool quiet_logs = false, const bool silent_logs = false); ~Logger(); - static ToolId findToolId(const char *tool_name); - -@@ -108,7 +118,13 @@ class Logger - inline void report(const std::string& message, - const Args&... args) - { -- logger_->log(spdlog::level::level_enum::off, message, args...); -+ spdlog::level::level_enum report_level = spdlog::level::level_enum::off; + static ToolId findToolId(const char* tool_name); + + template + inline void report(const std::string& message, const Args&... args) + { +- logger_->log(spdlog::level::level_enum::off, FMT_RUNTIME(message), args...); ++ spdlog::level::level_enum report_level = spdlog::level::level_enum::off; + -+ if (log_mode_ == LogMode::QUIET || log_mode_ == LogMode::SILENT) { -+ report_level = spdlog::level::level_enum::info; -+ } ++ if (log_mode_ == LogMode::QUIET || log_mode_ == LogMode::SILENT) { ++ report_level = spdlog::level::level_enum::info; ++ } + -+ logger_->log(report_level, message, args...); - } ++ logger_->log(report_level, FMT_RUNTIME(message), args...); + } - // Do NOT call this directly, use the debugPrint macro instead (defined below) -@@ -283,6 +299,7 @@ class Logger + // Do NOT call this directly, use the debugPrint macro instead (defined +@@ -302,6 +316,7 @@ class Logger std::vector sinks_; std::shared_ptr logger_; std::stack metrics_stages_; @@ -127,34 +106,24 @@ index de27099ce..989cc2b79 100644 // This matrix is pre-allocated so it can be safely updated // from multiple threads without locks. diff --git a/src/utl/include/utl/MakeLogger.h b/src/utl/include/utl/MakeLogger.h -index 543d48054..d4953d2b7 100644 +index 34fd71210..996982708 100644 --- a/src/utl/include/utl/MakeLogger.h +++ b/src/utl/include/utl/MakeLogger.h -@@ -45,9 +45,8 @@ struct Tcl_Interp; +@@ -45,7 +45,8 @@ struct Tcl_Interp; namespace ord { --utl::Logger * --makeLogger(const char *log_filename, -- const char *metrics_filename); +-utl::Logger* makeLogger(const char* log_filename, const char* metrics_filename); +utl::Logger *makeLogger(const char *log_filename, const char *metrics_filename, + const bool quiet_logs, const bool silent_logs); - void - initLogger(utl::Logger *logger, - Tcl_Interp *tcl_interp); + void initLogger(utl::Logger* logger, Tcl_Interp* tcl_interp); + + } // namespace ord diff --git a/src/utl/src/Logger.cpp b/src/utl/src/Logger.cpp -index be99dabb9..febef1829 100644 +index e7afdc316..ee4929ee8 100644 --- a/src/utl/src/Logger.cpp +++ b/src/utl/src/Logger.cpp -@@ -35,6 +35,7 @@ - - #include "utl/Logger.h" - -+#include - #include - #include - #include -@@ -42,12 +43,14 @@ +@@ -42,12 +42,14 @@ #include "spdlog/sinks/basic_file_sink.h" #include "spdlog/sinks/stdout_color_sinks.h" #include "spdlog/spdlog.h" @@ -165,17 +134,16 @@ index be99dabb9..febef1829 100644 int Logger::max_message_print = 1000; --Logger::Logger(const char* log_filename, const char *metrics_filename) +-Logger::Logger(const char* log_filename, const char* metrics_filename) +Logger::Logger(const char* log_filename, const char *metrics_filename, const bool quiet_logs, const bool silent_logs) - : debug_on_(false) + : debug_on_(false) { // This ensures it is safe to update the message counters -@@ -55,10 +58,24 @@ Logger::Logger(const char* log_filename, const char *metrics_filename) +@@ -55,7 +57,20 @@ Logger::Logger(const char* log_filename, const char* metrics_filename) static_assert(std::atomic::is_always_lock_free, "message counter should be atomic"); -- sinks_.push_back(std::make_shared()); -- if (log_filename) +- sinks_.push_back(std::make_shared()); + log_mode_ = LogMode::FULL; + auto stdout = std::make_shared(); + @@ -190,24 +158,18 @@ index be99dabb9..febef1829 100644 + sinks_.push_back(stdout); + } + -+ if (log_filename) { - sinks_.push_back(std::make_shared(log_filename)); -- -+ } -+ - logger_ = std::make_shared("logger", sinks_.begin(), sinks_.end()); - logger_->set_pattern(pattern_); - logger_->set_level(spdlog::level::level_enum::debug); + if (log_filename) + sinks_.push_back( + std::make_shared(log_filename)); diff --git a/src/utl/src/MakeLogger.cpp b/src/utl/src/MakeLogger.cpp -index 05ee22281..9ff5785ee 100644 +index 942ee7999..2f20ea5da 100644 --- a/src/utl/src/MakeLogger.cpp +++ b/src/utl/src/MakeLogger.cpp -@@ -46,10 +46,9 @@ namespace ord { +@@ -47,9 +47,9 @@ namespace ord { using utl::Logger; --Logger * --makeLogger(const char *log_filename, const char *metrics_filename) +-Logger* makeLogger(const char* log_filename, const char* metrics_filename) -{ - return new Logger(log_filename, metrics_filename); +Logger *makeLogger(const char *log_filename, const char *metrics_filename, @@ -215,4 +177,4 @@ index 05ee22281..9ff5785ee 100644 + return new Logger(log_filename, metrics_filename, quiet_logs, silent_logs); } - void \ No newline at end of file + void initLogger(Logger* logger, Tcl_Interp* tcl_interp) diff --git a/dependency_support/org_theopenroadproject/0002-ortools-quotes.patch b/dependency_support/org_theopenroadproject/0002-ortools-quotes.patch new file mode 100644 index 00000000..be48c950 --- /dev/null +++ b/dependency_support/org_theopenroadproject/0002-ortools-quotes.patch @@ -0,0 +1,53 @@ +diff --git a/src/gpl/src/mbff.cpp b/src/gpl/src/mbff.cpp +index 795d9c453..0c3e2f5a1 100644 +--- a/src/gpl/src/mbff.cpp ++++ b/src/gpl/src/mbff.cpp +@@ -37,11 +37,11 @@ + #include + #include + #include +-#include +-#include +-#include +-#include +-#include ++#include "ortools/base/logging.h" ++#include "ortools/linear_solver/linear_solver.h" ++#include "ortools/sat/cp_model.h" ++#include "ortools/sat/cp_model.pb.h" ++#include "ortools/sat/cp_model_solver.h" + + #include + #include +diff --git a/src/mpl2/src/bus_synthesis.cpp b/src/mpl2/src/bus_synthesis.cpp +index cbb4d36d4..0e2c9f5f7 100644 +--- a/src/mpl2/src/bus_synthesis.cpp ++++ b/src/mpl2/src/bus_synthesis.cpp +@@ -33,7 +33,7 @@ + + #include "bus_synthesis.h" + +-#include ++#include "ortools/linear_solver/linear_solver.h" + + #include + #include +diff --git a/src/par/src/Utilities.cpp b/src/par/src/Utilities.cpp +index 34c246e21..1a82bea9e 100644 +--- a/src/par/src/Utilities.cpp ++++ b/src/par/src/Utilities.cpp +@@ -37,10 +37,10 @@ + /////////////////////////////////////////////////////////////////////////////// + #include "Utilities.h" + +-#include +-#include +-#include +-#include ++#include "ortools/base/commandlineflags.h" ++#include "ortools/base/logging.h" ++#include "ortools/linear_solver/linear_solver.h" ++#include "ortools/linear_solver/linear_solver.pb.h" + + #include + #include diff --git a/dependency_support/org_theopenroadproject/build_helper.bzl b/dependency_support/org_theopenroadproject/build_helper.bzl new file mode 100644 index 00000000..f4dc4f5f --- /dev/null +++ b/dependency_support/org_theopenroadproject/build_helper.bzl @@ -0,0 +1,414 @@ +"""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 + "-Wno-missing-braces", # typically from TCL swigging + "-Wredundant-decls", + "-Wformat-security", + "-Wno-sign-compare", + "-Wno-unused-parameter", +] + +OPENROAD_BINARY_DEPS = [ + ":logger", + ":opendb_lib", + ":openroad_version", + ":opensta_lib", + "@tk_tcl//: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", + "@com_google_ortools//ortools/base:base", + "@com_google_ortools//ortools/linear_solver:linear_solver", + "@com_google_ortools//ortools/linear_solver:linear_solver_cc_proto", + "@com_google_ortools//ortools/sat:cp_model", + "@edu_berkeley_abc//:abc-lib", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/types:span", + "@boost//:geometry", + "@boost//:multi_array", + "@boost//:property_tree", + "@boost//:icl", + "@boost//:polygon", + "@boost//:graph", + "@boost//:asio", + "@boost//:stacktrace", + "@boost//:thread", + "@eigen//:eigen3", + "@com_github_quantamhd_lemon//:lemon", + "@org_llvm_openmp//:openmp", + "@com_github_gabime_spdlog//:spdlog", + "@tk_tcl//: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..deac755f 100644 --- a/dependency_support/org_theopenroadproject/bundled.BUILD.bazel +++ b/dependency_support/org_theopenroadproject/bundled.BUILD.bazel @@ -12,12 +12,37 @@ # 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") + +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") -package(features = ["-parse_headers"]) +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 +52,97 @@ exports_files([ "src/sta/etc/TclEncode.tcl", ]) +string_flag( + name = "platform", + build_setting_default = "cli", + values = [ + "cli", + ], +) + +config_setting( + name = "platform_cli", + flag_values = { + ":platform": "cli", + }, +) + 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": [], + }), + copts = OPENROAD_COPTS, features = ["-use_header_modules"], + linkopts = select({ + ":platform_cli": [], + }), 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"], + }), ) 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 = [ - "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", ], + exclude = OPENROAD_LIBRARY_SRCS_EXCLUDE, ) + [ "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", - #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", - ], + include = OPENROAD_LIBRARY_HDRS_INCLUDE, exclude = [ "src/utl/include/utl/Logger.h", + "src/utl/include/utl/CFileUtils.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\\\"", + "ENABLE_MPL2", ], 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, + 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", ], + hdrs = glob( + 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\\\"" - ], - 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", + "OPENROAD_GIT_DESCRIBE=\\\"bazel_rules_hdl\\\"", + "ENABLE_MPL2", ], - alwayslink = True, + features = ["-use_header_modules"], + includes = OPENROAD_LIBRARY_INCLUDES, + visibility = ["//visibility:public"], + deps = OPENROAD_LIBRARY_DEPS, ) genrule( @@ -449,17 +178,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 +216,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 +398,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 +407,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 +459,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 +502,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 +527,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 +582,7 @@ tcl_wrap_cc( name = "logger_swig", srcs = [ "src/utl/src/Logger.i", + "src/utl/src/LoggerCommon.h", ":error_swig", ], module = "utl", @@ -910,11 +682,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 +787,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 +864,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 +924,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 +942,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 +983,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 +994,7 @@ cc_library( "-Wno-error", ], features = [ - "-use_header_modules", + "-use_header_modules", ], includes = [ "src/odb/include", @@ -1166,9 +1011,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 +1020,9 @@ cc_library( "@boost//:bind", "@boost//:algorithm", "@boost//:thread", + "@com_github_gabime_spdlog//:spdlog_with_exceptions", + "@tk_tcl//:tcl", + "@net_zlib//:zlib", ], ) @@ -1196,12 +1041,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 +1059,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 +1086,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 +1106,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 +1218,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 +1283,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 +1294,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 +1314,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 +1365,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 +1378,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 +1396,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 +1410,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 +1419,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 +1433,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 +1452,7 @@ cc_library( visibility = ["@org_theopenroadproject//:__subpackages__"], deps = [ "@tk_tcl//:tcl", + "@net_zlib//:zlib", ], ) diff --git a/dependency_support/org_theopenroadproject/org_theopenroadproject.bzl b/dependency_support/org_theopenroadproject/org_theopenroadproject.bzl index cd3f76a6..be4db3c0 100644 --- a/dependency_support/org_theopenroadproject/org_theopenroadproject.bzl +++ b/dependency_support/org_theopenroadproject/org_theopenroadproject.bzl @@ -21,15 +21,14 @@ def org_theopenroadproject(): maybe( new_git_repository, name = "org_theopenroadproject", - commit = "21b84678f4eb0eae2e38b897e4e0d36e145f99cd", + commit = "03f219802d0ee569eb86846529260e15a020c26c", init_submodules = True, remote = "https://github.com/The-OpenROAD-Project/OpenROAD.git", build_file = Label("@rules_hdl//dependency_support/org_theopenroadproject:bundled.BUILD.bazel"), + shallow_since = "1649354925 -0300", patches = [ Label("@rules_hdl//dependency_support/org_theopenroadproject:0001-logging-change-to-support-silence.patch"), + Label("@rules_hdl//dependency_support/org_theopenroadproject:0002-ortools-quotes.patch"), ], - patch_args = [ - "-p1", - ], - shallow_since = "1659478013 -0700" + patch_args = ["-p1"], )