diff options
Diffstat (limited to 'grpc/bazel/grpc_build_system.bzl')
-rw-r--r-- | grpc/bazel/grpc_build_system.bzl | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/grpc/bazel/grpc_build_system.bzl b/grpc/bazel/grpc_build_system.bzl index 34527880..85ec2d6b 100644 --- a/grpc/bazel/grpc_build_system.bzl +++ b/grpc/bazel/grpc_build_system.bzl @@ -24,6 +24,7 @@ # load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") +load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS") load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library") load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") @@ -48,6 +49,8 @@ def _get_external_deps(external_deps): for dep in external_deps: if dep == "address_sorting": ret += ["//third_party/address_sorting"] + elif dep == "xxhash": + ret += ["//third_party/xxhash"] elif dep == "cares": ret += select({ "//:grpc_no_ares": [], @@ -77,7 +80,8 @@ def grpc_cc_library( alwayslink = 0, data = [], use_cfstream = False, - tags = []): + tags = [], + linkstatic = False): copts = [] if use_cfstream: copts = if_mac(["-DGRPC_CFSTREAM"]) @@ -109,7 +113,7 @@ def grpc_cc_library( }), hdrs = hdrs + public_hdrs, deps = deps + _get_external_deps(external_deps), - copts = copts, + copts = GRPC_DEFAULT_COPTS + copts, visibility = visibility, testonly = testonly, linkopts = linkopts, @@ -121,6 +125,7 @@ def grpc_cc_library( alwayslink = alwayslink, data = data, tags = tags, + linkstatic = linkstatic, ) def grpc_proto_plugin(name, srcs = [], deps = []): @@ -175,8 +180,8 @@ def ios_cc_test( deps = ios_test_deps, ) -def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None): - copts = if_mac(["-DGRPC_CFSTREAM"]) +def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, copts = []): + copts = copts + if_mac(["-DGRPC_CFSTREAM"]) if language.upper() == "C": copts = copts + if_not_windows(["-std=c99"]) @@ -187,7 +192,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data "args": args, "data": data, "deps": deps + _get_external_deps(external_deps), - "copts": copts, + "copts": GRPC_DEFAULT_COPTS + copts, "linkopts": if_not_windows(["-pthread"]), "size": size, "timeout": timeout, @@ -249,7 +254,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da testonly = testonly, linkshared = linkshared, deps = deps + _get_external_deps(external_deps), - copts = copts, + copts = GRPC_DEFAULT_COPTS + copts, linkopts = if_not_windows(["-pthread"]) + linkopts, tags = tags, features = features, |