[Build] No bind for upb (#36349)

To simplify the build process, let's remove unnecessary Bazel bindings. These bindings were originally used to manage differences between OSS and our internal build environment. However, bindings are now deprecated and introduce unnecessary complexity. Removing them will make the build process more straightforward and easier to maintain.

Closes #36349

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36349 from veblush:upb-link 3eda0c6f92
PiperOrigin-RevId: 624284314
pull/36354/head
Esun Kim 8 months ago committed by Copybara-Service
parent fadf1bbd9b
commit 3fe06af9a3
  1. 56
      BUILD
  2. 4
      bazel/grpc_build_system.bzl
  3. 30
      bazel/grpc_deps.bzl
  4. 40
      src/core/BUILD
  5. 4
      src/cpp/ext/csm/BUILD

56
BUILD

@ -1054,9 +1054,9 @@ grpc_cc_library(
"absl/strings", "absl/strings",
"absl/types:optional", "absl/types:optional",
"absl/types:span", "absl/types:span",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"upb_message_lib", "@com_google_protobuf//upb:message",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -1277,9 +1277,9 @@ grpc_cc_library(
"include/grpcpp/security/alts_util.h", "include/grpcpp/security/alts_util.h",
], ],
external_deps = [ external_deps = [
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"upb_message_lib", "@com_google_protobuf//upb:message",
], ],
language = "c++", language = "c++",
standalone = True, standalone = True,
@ -2347,8 +2347,8 @@ grpc_cc_library(
"//src/core:tsi/alts/handshaker/transport_security_common_api.h", "//src/core:tsi/alts/handshaker/transport_security_common_api.h",
], ],
external_deps = [ external_deps = [
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
visibility = ["@grpc:tsi"], visibility = ["@grpc:tsi"],
@ -2365,8 +2365,8 @@ grpc_cc_library(
"libssl", "libssl",
"libcrypto", "libcrypto",
"absl/strings", "absl/strings",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
tags = ["nofixdeps"], tags = ["nofixdeps"],
@ -2410,8 +2410,8 @@ grpc_cc_library(
"absl/synchronization", "absl/synchronization",
"absl/memory", "absl/memory",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"protobuf_headers", "protobuf_headers",
"absl/container:inlined_vector", "absl/container:inlined_vector",
], ],
@ -2490,8 +2490,8 @@ grpc_cc_library(
"absl/synchronization", "absl/synchronization",
"absl/types:optional", "absl/types:optional",
"absl/memory", "absl/memory",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"absl/strings:str_format", "absl/strings:str_format",
"protobuf_headers", "protobuf_headers",
], ],
@ -2664,8 +2664,8 @@ grpc_cc_library(
"absl/strings", "absl/strings",
"absl/time", "absl/time",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
public_hdrs = [ public_hdrs = [
@ -3501,8 +3501,8 @@ grpc_cc_library(
"absl/base:core_headers", "absl/base:core_headers",
"absl/status", "absl/status",
"absl/strings", "absl/strings",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -3602,9 +3602,9 @@ grpc_cc_library(
"absl/strings:cord", "absl/strings:cord",
"absl/types:optional", "absl/types:optional",
"absl/types:variant", "absl/types:variant",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"upb_message_lib", "@com_google_protobuf//upb:message",
], ],
language = "c++", language = "c++",
visibility = ["@grpc:client_channel"], visibility = ["@grpc:client_channel"],
@ -4004,8 +4004,8 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/strings", "absl/strings",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
visibility = ["@grpc:public"], visibility = ["@grpc:public"],
@ -4257,11 +4257,11 @@ grpc_cc_library(
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"upb_textformat_lib", "@com_google_protobuf//upb:text",
"upb_json_lib", "@com_google_protobuf//upb:json",
"upb_reflection", "@com_google_protobuf//upb:reflection",
], ],
language = "c++", language = "c++",
tags = ["nofixdeps"], tags = ["nofixdeps"],

@ -58,7 +58,9 @@ def if_windows(a):
def _get_external_deps(external_deps): def _get_external_deps(external_deps):
ret = [] ret = []
for dep in external_deps: for dep in external_deps:
if dep == "address_sorting": if dep.startswith("@"):
ret.append(dep)
elif dep == "address_sorting":
ret.append("//third_party/address_sorting") ret.append("//third_party/address_sorting")
elif dep == "xxhash": elif dep == "xxhash":
ret.append("//third_party/xxhash") ret.append("//third_party/xxhash")

@ -20,36 +20,6 @@ load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps")
def grpc_deps(): def grpc_deps():
"""Loads dependencies need to compile and test the grpc library.""" """Loads dependencies need to compile and test the grpc library."""
native.bind(
name = "upb_base_lib",
actual = "@com_google_protobuf//upb/base",
)
native.bind(
name = "upb_message_lib",
actual = "@com_google_protobuf//upb:message",
)
native.bind(
name = "upb_mem_lib",
actual = "@com_google_protobuf//upb/mem",
)
native.bind(
name = "upb_reflection",
actual = "@com_google_protobuf//upb:reflection",
)
native.bind(
name = "upb_textformat_lib",
actual = "@com_google_protobuf//upb/text",
)
native.bind(
name = "upb_json_lib",
actual = "@com_google_protobuf//upb/json",
)
native.bind( native.bind(
name = "libssl", name = "libssl",
actual = "@boringssl//:ssl", actual = "@boringssl//:ssl",

@ -364,8 +364,8 @@ grpc_cc_library(
"absl/strings:cord", "absl/strings:cord",
"absl/time", "absl/time",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -3481,9 +3481,9 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/strings", "absl/strings",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"upb_message_lib", "@com_google_protobuf//upb:message",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -4767,8 +4767,8 @@ grpc_cc_library(
"absl/strings:str_format", "absl/strings:str_format",
"absl/types:optional", "absl/types:optional",
"absl/types:variant", "absl/types:variant",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -4883,8 +4883,8 @@ grpc_cc_library(
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -4944,7 +4944,7 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/strings", "absl/strings",
"upb_base_lib", "@com_google_protobuf//upb:base",
], ],
language = "c++", language = "c++",
deps = ["//:gpr_platform"], deps = ["//:gpr_platform"],
@ -5020,13 +5020,13 @@ grpc_cc_library(
"absl/types:optional", "absl/types:optional",
"absl/types:span", "absl/types:span",
"absl/types:variant", "absl/types:variant",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
"upb_textformat_lib", "@com_google_protobuf//upb:text",
"upb_json_lib", "@com_google_protobuf//upb:json",
"re2", "re2",
"upb_reflection", "@com_google_protobuf//upb:reflection",
"upb_message_lib", "@com_google_protobuf//upb:message",
], ],
language = "c++", language = "c++",
tags = ["nofixdeps"], tags = ["nofixdeps"],
@ -5491,8 +5491,8 @@ grpc_cc_library(
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -6107,8 +6107,8 @@ grpc_cc_library(
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
"absl/types:optional", "absl/types:optional",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
deps = [ deps = [

@ -49,8 +49,8 @@ grpc_cc_library(
"otel/api", "otel/api",
"otel/sdk/src/metrics", "otel/sdk/src/metrics",
"otel/sdk:headers", "otel/sdk:headers",
"upb_base_lib", "@com_google_protobuf//upb:base",
"upb_mem_lib", "@com_google_protobuf//upb:mem",
], ],
language = "c++", language = "c++",
visibility = ["//:__subpackages__"], visibility = ["//:__subpackages__"],

Loading…
Cancel
Save