From c08ebde007b0c57780d8d63c1f925c1d6a8bfc7c Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 23 Mar 2020 15:28:47 -0700 Subject: [PATCH] Append 'grpc' to the C++ service namespaces for google APIs PiperOrigin-RevId: 302531346 Change-Id: I6ed8a2840679d3664cfb491a7560c3e8286aa622 --- third_party/googleapis/build_rules.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/googleapis/build_rules.bzl b/third_party/googleapis/build_rules.bzl index d92ed1c5a13..377d74be1ad 100644 --- a/third_party/googleapis/build_rules.bzl +++ b/third_party/googleapis/build_rules.bzl @@ -56,7 +56,7 @@ def cc_proto_library(name, deps): visibility = ["//visibility:public"], ) -def cc_grpc_library(name, srcs, deps, **kwargs): +def cc_grpc_library(name, srcs, deps, service_namespace = "grpc", **kwargs): """Generates a cc library with grpc implementation and cc proto headers Args: @@ -72,6 +72,9 @@ def cc_grpc_library(name, srcs, deps, **kwargs): generate_cc( name = codegen_grpc_target, srcs = srcs, + flags = [ + "services_namespace=" + service_namespace, + ], plugin = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin", well_known_protos = True, generate_mocks = True,