From e8dbd8aaae5d813546abe4956361c4e6512d8c88 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 18:54:36 +0200 Subject: [PATCH] Adding back external_deps and public_hdrs. --- BUILD | 14 +++++++++----- grpc-build-system.bzl | 29 +++++++++-------------------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/BUILD b/BUILD index a0320bc5bf0..eeca0641895 100644 --- a/BUILD +++ b/BUILD @@ -537,11 +537,13 @@ grpc_cc_library( "include/grpc/grpc_security.h", "include/grpc/census.h", ], + external_deps = [ + "libssl", + "zlib", + "nanopb", + ], deps = [ - "//external:libssl", - "//external:zlib", ":gpr", - "//external:nanopb", ], language = "C", ) @@ -690,9 +692,11 @@ grpc_cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", ], + external_deps = [ + "libssl", + "protobuf_clib", + ], deps = [ - "//external:libssl", - "//external:protobuf_clib", ":grpc", ], ) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index c18c57f087a..8ae362624ca 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -1,32 +1,21 @@ -def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): +# +# This is for the gRPC build system. This isn't intended to be used outsite of +# the BUILD file for gRPC. It contains the mapping for the template system we +# use to generate other platform's build system files. +# + +def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"): copts = [] if language == "C": copts = ["-std=c99"] native.cc_library( name = name, srcs = srcs, - hdrs = hdrs, - deps = deps, + hdrs = hdrs + public_hdrs, + deps = deps + ["//external:" + dep for dep in external_deps], copts = copts, linkopts = ["-pthread"], includes = [ "include" ] ) - - -def nanopb(): - native.cc_library( - name = "nanopb", - srcs = [ - '//third_party/nanopb/pb_common.c', - '//third_party/nanopb/pb_decode.c', - '//third_party/nanopb/pb_encode.c', - ], - hdrs = [ - '//third_party/nanopb/pb.h', - '//third_party/nanopb/pb_common.h', - '//third_party/nanopb/pb_decode.h', - '//third_party/nanopb/pb_encode.h', - ] - )