Skip to content

Commit 7bb4d4e

Browse files
committed
We're not using runfiles anymore, don't use associated macro define.
We used to use runfiles to work with tcl dependencies. Since we don't need that anymore, just add a regular `BAZEL_BUILD` define to choose the behavior in the bazel build and remove the unneeded dependency. Signed-off-by: Henner Zeller <h.zeller@acm.org>
1 parent 1475199 commit 7bb4d4e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ cc_binary(
285285
"-Wno-unused-parameter",
286286
"-Wno-sign-compare",
287287
],
288+
defines = ["BAZEL_BUILD"],
288289
features = ["-use_header_modules"],
289290
includes = [
290291
"",

app/Main.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <string_view>
3232
#include <tcl.h>
3333

34-
#ifdef BAZEL_CURRENT_REPOSITORY
34+
#ifdef BAZEL_BUILD
3535
#include "bazel/tcl_library_init.h"
3636
#include "src/tcl_readline_setup.h"
3737
#endif
@@ -115,7 +115,7 @@ staTclAppInit(int argc,
115115
std::string_view init_filename,
116116
Tcl_Interp *interp)
117117
{
118-
#ifdef BAZEL_CURRENT_REPOSITORY
118+
#ifdef BAZEL_BUILD
119119
if (in_bazel::SetupTclEnvironment(interp) == TCL_ERROR) {
120120
return TCL_ERROR;
121121
}
@@ -126,7 +126,7 @@ staTclAppInit(int argc,
126126
return TCL_ERROR;
127127

128128
bool has_readline = false;
129-
#ifdef BAZEL_CURRENT_REPOSITORY
129+
#ifdef BAZEL_BUILD
130130
has_readline = (ord::SetupTclReadlineLibrary(interp) == TCL_OK);
131131
#endif
132132
#if TCL_READLINE

0 commit comments

Comments
 (0)