mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-09-01 02:17:08 +02:00
Merge pull request #335 from hzeller/feature-20260405-init-tcl
Use same tcl initialization as in OpenROAD
This commit is contained in:
@@ -272,7 +272,6 @@ cc_binary(
|
||||
"app/Main.cc",
|
||||
":StaApp",
|
||||
":StaTclInitVar",
|
||||
"//bazel:runfiles",
|
||||
],
|
||||
copts = [
|
||||
"-Wno-error",
|
||||
@@ -297,6 +296,7 @@ cc_binary(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":opensta_lib",
|
||||
"//bazel:tcl_library_init",
|
||||
"@rules_cc//cc/runfiles",
|
||||
"@tcl_lang//:tcl",
|
||||
],
|
||||
|
||||
+11
@@ -30,6 +30,11 @@
|
||||
#include <filesystem>
|
||||
#include <string_view>
|
||||
#include <tcl.h>
|
||||
|
||||
#ifdef BAZEL_CURRENT_REPOSITORY
|
||||
#include "bazel/tcl_library_init.h"
|
||||
#endif
|
||||
|
||||
#if TCL_READLINE
|
||||
#include <tclreadline.h>
|
||||
#endif
|
||||
@@ -109,6 +114,12 @@ staTclAppInit(int argc,
|
||||
std::string_view init_filename,
|
||||
Tcl_Interp *interp)
|
||||
{
|
||||
#ifdef BAZEL_CURRENT_REPOSITORY
|
||||
if (in_bazel::SetupTclEnvironment(interp) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
// source init.tcl
|
||||
if (Tcl_Init(interp) == TCL_ERROR)
|
||||
return TCL_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user