From c4b510246c0049d3c583efa8c6e7606b1131231c Mon Sep 17 00:00:00 2001 From: kailashs Date: Sun, 3 Jun 2018 13:39:32 -0700 Subject: 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. --- bazel/cc_grpc_library.bzl | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'bazel') 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], -- cgit v1.2.3