Nicolas "Pixel" Noble | e8dbd8a | 2016-10-20 18:54:36 +0200 | [diff] [blame^] | 1 | # |
| 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 | |
| 7 | def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"): |
Nicolas "Pixel" Noble | 31d11db | 2016-10-20 09:29:46 +0200 | [diff] [blame] | 8 | copts = [] |
| 9 | if language == "C": |
| 10 | copts = ["-std=c99"] |
| 11 | native.cc_library( |
| 12 | name = name, |
| 13 | srcs = srcs, |
Nicolas "Pixel" Noble | e8dbd8a | 2016-10-20 18:54:36 +0200 | [diff] [blame^] | 14 | hdrs = hdrs + public_hdrs, |
| 15 | deps = deps + ["//external:" + dep for dep in external_deps], |
Nicolas "Pixel" Noble | 31d11db | 2016-10-20 09:29:46 +0200 | [diff] [blame] | 16 | copts = copts, |
Nicolas "Pixel" Noble | 60ca22f | 2016-10-20 10:23:53 +0200 | [diff] [blame] | 17 | linkopts = ["-pthread"], |
Nicolas "Pixel" Noble | 31d11db | 2016-10-20 09:29:46 +0200 | [diff] [blame] | 18 | includes = [ |
| 19 | "include" |
| 20 | ] |
| 21 | ) |