From 1ecdec1805295bb3f6ca259b7f6fc32d53bcb133 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Tue, 15 Sep 2026 22:38:24 +0200 Subject: [PATCH] Revert "Factor out runfiles libraries into shared constant" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 622492bc50c5e8dea3861d9610fa8720a71d2f2d. We assume that @rules_cc//cc/runfiles is stable enough so that we don’t need this indirection any longer. --- elisp/private/tools/BUILD | 11 +++++++---- private/cc_config.bzl | 6 ------ tests/tools/BUILD | 11 +++++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/elisp/private/tools/BUILD b/elisp/private/tools/BUILD index 7ac0764b..3c194941 100644 --- a/elisp/private/tools/BUILD +++ b/elisp/private/tools/BUILD @@ -23,7 +23,7 @@ load("//elisp:elisp_library.bzl", "elisp_library") load("//elisp/private:bootstrap.bzl", "bootstrap") load("//elisp/private:cc_launcher_config.bzl", "LAUNCHER_COPTS", "LAUNCHER_DEFINES", "LAUNCHER_DEPS", "LAUNCHER_FEATURES", "LAUNCHER_LINKOPTS") load("//elisp/private:manual.bzl", "MAX_MANUAL_ADDITIONAL_INPUTS") -load("//private:cc_config.bzl", "COPTS", "CXXOPTS", "DEFINES", "FEATURES", "LINKOPTS", "RUNFILES_LIBS") +load("//private:cc_config.bzl", "COPTS", "CXXOPTS", "DEFINES", "FEATURES", "LINKOPTS") load("//private:package_features.bzl", "PACKAGE_FEATURES") load("//private:rlocation.bzl", "rlocation") @@ -154,7 +154,8 @@ cc_library( "@abseil-cpp//absl/log:check", "@abseil-cpp//absl/status", "@abseil-cpp//absl/strings", - ] + RUNFILES_LIBS, # keep + "@rules_cc//cc/runfiles", # keep + ], linkopts = LINKOPTS, linkstatic = True, local_defines = DEFINES, @@ -206,7 +207,8 @@ cc_library( "@abseil-cpp//absl/log:check", "@abseil-cpp//absl/status", "@abseil-cpp//absl/strings:str_format", - ] + RUNFILES_LIBS, # keep + "@rules_cc//cc/runfiles", # keep + ], linkopts = LINKOPTS, linkstatic = True, local_defines = DEFINES, @@ -243,7 +245,8 @@ cc_library( "@abseil-cpp//absl/strings", "@abseil-cpp//absl/strings:str_format", "@abseil-cpp//absl/time", - ] + RUNFILES_LIBS, # keep + "@rules_cc//cc/runfiles", # keep + ], linkopts = LINKOPTS, linkstatic = True, local_defines = DEFINES + [ diff --git a/private/cc_config.bzl b/private/cc_config.bzl index ae6d76e0..7aab01ff 100644 --- a/private/cc_config.bzl +++ b/private/cc_config.bzl @@ -121,9 +121,3 @@ LINKOPTS = select({ ], "//conditions:default": [], }) - -# These libraries have to be added to cc_library dependencies to define the -# BAZEL_CURRENT_REPOSITORY preprocessor symbol. -RUNFILES_LIBS = [ - Label("@rules_cc//cc/runfiles"), -] diff --git a/tests/tools/BUILD b/tests/tools/BUILD index 145470dd..11bc57ed 100644 --- a/tests/tools/BUILD +++ b/tests/tools/BUILD @@ -16,7 +16,7 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@rules_cc//cc:cc_test.bzl", "cc_test") load("@rules_go//go:go_test.bzl", "go_test") load("//elisp:elisp_test.bzl", "elisp_test") -load("//private:cc_config.bzl", "COPTS", "CXXOPTS", "DEFINES", "FEATURES", "LINKOPTS", "RUNFILES_LIBS") +load("//private:cc_config.bzl", "COPTS", "CXXOPTS", "DEFINES", "FEATURES", "LINKOPTS") load("//private:package_features.bzl", "PACKAGE_FEATURES") load("//private:rlocation.bzl", "rlocation", "runfileflag") @@ -77,7 +77,8 @@ cc_test( "@abseil-cpp//absl/strings:str_format", "@googletest//:gtest", "@googletest//:gtest_main", # keep - ] + RUNFILES_LIBS, # keep + "@rules_cc//cc/runfiles", # keep + ], ) cc_test( @@ -142,7 +143,8 @@ cc_test( "@abseil-cpp//absl/status:statusor", "@googletest//:gtest", "@googletest//:gtest_main", # keep - ] + RUNFILES_LIBS, # keep + "@rules_cc//cc/runfiles", # keep + ], ) cc_test( @@ -181,7 +183,8 @@ cc_test( "@abseil-cpp//absl/time", "@googletest//:gtest", "@googletest//:gtest_main", # keep - ] + RUNFILES_LIBS, # keep + "@rules_cc//cc/runfiles", # keep + ], ) build_test(