From c08d7614e929a6eb280bd95dab2d86ec8a6fdda3 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 11 Jun 2026 00:33:23 +0200 Subject: [PATCH] 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 --- BUILD | 2 +- app/Main.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILD b/BUILD index 5d867b502..7cd451a59 100644 --- a/BUILD +++ b/BUILD @@ -285,6 +285,7 @@ cc_binary( "-Wno-unused-parameter", "-Wno-sign-compare", ], + defines = ["BAZEL_BUILD"], features = ["-use_header_modules"], includes = [ "", @@ -298,7 +299,6 @@ cc_binary( ":opensta_lib", "//:tcl_readline_setup", "//bazel:tcl_library_init", - "@rules_cc//cc/runfiles", "@tcl_lang//:tcl", ], ) diff --git a/app/Main.cc b/app/Main.cc index 272cb307f..90405a1a2 100644 --- a/app/Main.cc +++ b/app/Main.cc @@ -31,7 +31,7 @@ #include #include -#ifdef BAZEL_CURRENT_REPOSITORY +#ifdef BAZEL_BUILD #include "bazel/tcl_library_init.h" #include "src/tcl_readline_setup.h" #endif @@ -115,7 +115,7 @@ staTclAppInit(int argc, std::string_view init_filename, Tcl_Interp *interp) { -#ifdef BAZEL_CURRENT_REPOSITORY +#ifdef BAZEL_BUILD if (in_bazel::SetupTclEnvironment(interp) == TCL_ERROR) { return TCL_ERROR; } @@ -126,7 +126,7 @@ staTclAppInit(int argc, return TCL_ERROR; bool has_readline = false; -#ifdef BAZEL_CURRENT_REPOSITORY +#ifdef BAZEL_BUILD has_readline = (ord::SetupTclReadlineLibrary(interp) == TCL_OK); #endif #if TCL_READLINE