File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,7 +272,6 @@ cc_binary(
272272 "app/Main.cc" ,
273273 ":StaApp" ,
274274 ":StaTclInitVar" ,
275- "//bazel:runfiles" ,
276275 ],
277276 copts = [
278277 "-Wno-error" ,
@@ -297,6 +296,7 @@ cc_binary(
297296 visibility = ["//visibility:public" ],
298297 deps = [
299298 ":opensta_lib" ,
299+ "//bazel:tcl_library_init" ,
300300 "@rules_cc//cc/runfiles" ,
301301 "@tcl_lang//:tcl" ,
302302 ],
Original file line number Diff line number Diff line change 3030#include < filesystem>
3131#include < string_view>
3232#include < tcl.h>
33+
34+ #ifdef BAZEL_CURRENT_REPOSITORY
35+ #include " bazel/tcl_library_init.h"
36+ #endif
37+
3338#if TCL_READLINE
3439 #include < tclreadline.h>
3540#endif
@@ -109,6 +114,12 @@ staTclAppInit(int argc,
109114 std::string_view init_filename,
110115 Tcl_Interp *interp)
111116{
117+ #ifdef BAZEL_CURRENT_REPOSITORY
118+ if (in_bazel::SetupTclEnvironment (interp) == TCL_ERROR) {
119+ return TCL_ERROR;
120+ }
121+ #endif
122+
112123 // source init.tcl
113124 if (Tcl_Init (interp) == TCL_ERROR)
114125 return TCL_ERROR;
You can’t perform that action at this time.
0 commit comments