aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazel
diff options
context:
space:
mode:
authorGravatar kailashs <kailashs@google.com>2018-06-03 13:39:32 -0700
committerGravatar kailashs <kailashs@google.com>2018-06-03 13:39:32 -0700
commitc4b510246c0049d3c583efa8c6e7606b1131231c (patch)
tree57962462024bfcaf8933726ff04dadf5e7947aee /bazel
parent17f682d8274ef0b7d1376eeee5e94839a0750e0e (diff)
Updated cc_grpc_library to refer to fully qualified rules including
workspace name. This removes the need for the use_external = True flag for out of workspace build of gRPC client/server code.
Diffstat (limited to 'bazel')
-rw-r--r--bazel/cc_grpc_library.bzl17
1 files changed, 3 insertions, 14 deletions
diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl
index 5216a7a44b..3288565714 100644
--- a/bazel/cc_grpc_library.bzl
+++ b/bazel/cc_grpc_library.bzl
@@ -43,12 +43,7 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo
)
if not proto_only:
- if use_external:
- # when this file is used by non-grpc projects
- plugin = "//external:grpc_cpp_plugin"
- else:
- plugin = "//:grpc_cpp_plugin"
-
+ plugin = "@com_github_grpc_grpc//:grpc_cpp_plugin"
generate_cc(
name = codegen_grpc_target,
srcs = [proto_target],
@@ -57,14 +52,8 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo
generate_mocks = generate_mocks,
**kwargs
)
-
- if use_external:
- # when this file is used by non-grpc projects
- grpc_deps = ["//external:grpc++_codegen_proto",
- "//external:protobuf"]
- else:
- grpc_deps = ["//:grpc++_codegen_proto", "//external:protobuf"]
-
+ grpc_deps = ["@com_github_grpc_grpc//:grpc++_codegen_proto",
+ "//external:protobuf"]
native.cc_library(
name = name,
srcs = [":" + codegen_grpc_target, ":" + codegen_target],