blob: 8ae362624ca9ff049459154f0d6812949d2603ff [file] [log] [blame]
Nicolas "Pixel" Noblee8dbd8a2016-10-20 18:54:36 +02001#
2# This is for the gRPC build system. This isn't intended to be used outsite of
3# the BUILD file for gRPC. It contains the mapping for the template system we
4# use to generate other platform's build system files.
5#
6
7def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"):
Nicolas "Pixel" Noble31d11db2016-10-20 09:29:46 +02008 copts = []
9 if language == "C":
10 copts = ["-std=c99"]
11 native.cc_library(
12 name = name,
13 srcs = srcs,
Nicolas "Pixel" Noblee8dbd8a2016-10-20 18:54:36 +020014 hdrs = hdrs + public_hdrs,
15 deps = deps + ["//external:" + dep for dep in external_deps],
Nicolas "Pixel" Noble31d11db2016-10-20 09:29:46 +020016 copts = copts,
Nicolas "Pixel" Noble60ca22f2016-10-20 10:23:53 +020017 linkopts = ["-pthread"],
Nicolas "Pixel" Noble31d11db2016-10-20 09:29:46 +020018 includes = [
19 "include"
20 ]
21 )