diff options
author | David Garcia Quintas <dgq@google.com> | 2018-05-31 16:45:03 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2018-05-31 16:45:03 -0700 |
commit | 483b4b7bded98fd008e7db6007a95a8a32d943e5 (patch) | |
tree | 733c1483d20b35782096d93ab93ba86629f764e1 /bazel | |
parent | 2a0d447d272cea8a5e077a16799f860edef7295e (diff) |
Treat nanopb as a regular external dep
Diffstat (limited to 'bazel')
-rw-r--r-- | bazel/grpc_build_system.bzl | 23 | ||||
-rw-r--r-- | bazel/grpc_deps.bzl | 10 |
2 files changed, 9 insertions, 24 deletions
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 095b1596c8..63ed77e2a9 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -36,9 +36,7 @@ def if_not_windows(a): def _get_external_deps(external_deps): ret = [] for dep in external_deps: - if dep == "nanopb": - ret += ["grpc_nanopb"] - elif dep == "address_sorting": + if dep == "address_sorting": ret += ["//third_party/address_sorting"] elif dep == "cares": ret += select({"//:grpc_no_ares": [], @@ -160,25 +158,6 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da linkopts = if_not_windows(["-pthread"]) + linkopts, ) -def grpc_generate_one_off_targets(): - native.cc_library( - name = "grpc_nanopb", - hdrs = [ - "//third_party/nanopb:pb.h", - "//third_party/nanopb:pb_common.h", - "//third_party/nanopb:pb_decode.h", - "//third_party/nanopb:pb_encode.h", - ], - srcs = [ - "//third_party/nanopb:pb_common.c", - "//third_party/nanopb:pb_decode.c", - "//third_party/nanopb:pb_encode.c", - ], - defines = [ - "PB_FIELD_16BIT=1", - ], - ) - def grpc_sh_test(name, srcs, args = [], data = []): native.sh_test( name = name, diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 53073941f3..50d1d24303 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -2,6 +2,12 @@ def grpc_deps(): """Loads dependencies need to compile and test the grpc library.""" + + native.bind( + name = "nanopb", + actual = "@com_github_grpc_grpc//third_party/nanopb:nanopb", + ) + native.bind( name = "libssl", actual = "@boringssl//:ssl", @@ -59,12 +65,12 @@ def grpc_deps(): native.bind( name = "grpc_cpp_plugin", - actual = "@com_github_grpc_grpc//:grpc_cpp_plugin" + actual = "@com_github_grpc_grpc//:grpc_cpp_plugin", ) native.bind( name = "grpc++_codegen_proto", - actual = "@com_github_grpc_grpc//:grpc++_codegen_proto" + actual = "@com_github_grpc_grpc//:grpc++_codegen_proto", ) if "boringssl" not in native.existing_rules(): |