Break the `@bazel_tools//tools/def_parser:def_parser` cycle in the default case
This matches the setup used by the native rules: https://github.com/bazelbuild/bazel/blob/eb23cdb2e1813db3add8878dd28e0cd5f38513f9/tools/cpp/BUILD.tools#L56-L76
This is not a complete fix as noted in https://github.com/bazelbuild/bazel/issues/27103#issuecomment-3380779946 but at least preserves the old behavior.
PiperOrigin-RevId: 816637625
Change-Id: Ib14edf8a591e2f674eb09bce9ffd125b5797d4d9
diff --git a/BUILD b/BUILD
index 6acb98f..704df8a 100644
--- a/BUILD
+++ b/BUILD
@@ -9,6 +9,9 @@
cc_library(
name = "empty_lib",
# compatible_with = [...]
+ tags = [
+ "__DONT_DEPEND_ON_DEF_PARSER__",
+ ],
)
# Label flag for extra libraries to be linked into every binary.
@@ -23,6 +26,9 @@
cc_library(
name = "link_extra_lib",
# compatible_with = [...]
+ tags = [
+ "__DONT_DEPEND_ON_DEF_PARSER__",
+ ],
deps = [
":link_extra_libs",
],