Files
tensorflow--tensorflow/third_party/py/rules_cc_protobuf.patch
T
wehub-resource-sync 8a852e4b4e
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s
chore: import upstream snapshot with attribution
2026-07-13 12:14:16 +08:00

29 lines
1.1 KiB
Diff

--- a/cc/defs.bzl
+++ b/cc/defs.bzl
@@ -18,3 +18,4 @@
"""Starlark rules for building C++ projects."""
+load("@com_google_protobuf//bazel:cc_proto_library.bzl", _protobuf_cc_proto_library = "cc_proto_library")
load("//cc:cc_binary.bzl", _cc_binary = "cc_binary")
@@ -48,20 +49,3 @@
objc_import = _objc_import
-# DEPRECATED: use rule from com_google_protobuf repository
-def cc_proto_library(**kwargs):
- """Deprecated redirection macro for cc_proto_library.
-
- Use cc_proto_library from com_google_protobuf.
-
- On Bazel <8, redirects to native.cc_proto_library.
- On Bazel >=8, redirects to a mock rule, that fails when analyzed.
- This allows for a gradual migration away from this macro.
-
- Args:
- **kwargs: passed directly into cc_proto_library
- """
- __cc_proto_library = getattr(native, "cc_proto_library", _cc_proto_library)
- if "deprecation" not in kwargs:
- __cc_proto_library(deprecation = CC_PROTO_LIBRARY_DEPRECATION, **kwargs)
- else:
- __cc_proto_library(**kwargs)
+cc_proto_library = _protobuf_cc_proto_library