diff options
author | 2017-11-10 16:36:51 -0800 | |
---|---|---|
committer | 2017-11-10 16:36:51 -0800 | |
commit | 54e8f37e537794c2d814c1604c1282125f64f093 (patch) | |
tree | bfcf3e3830b425293d36059b306368aa64489f71 | |
parent | 5d7cb430227cbd1d37dbc594ebdac9ceb66f6304 (diff) | |
parent | 60409759308322e94f79df0f37f2f194e8fc212d (diff) |
Merge pull request #13358 from vjpai/config_noares
Allow bazel builds to disable c-ares at command line or bazelrc
-rw-r--r-- | BUILD | 5 | ||||
-rw-r--r-- | bazel/grpc_build_system.bzl | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -33,6 +33,11 @@ load( "grpc_generate_one_off_targets", ) +config_setting( + name = "grpc_no_ares", + values = {"define": "grpc_no_ares=true"}, +) + # This should be updated along with build.yaml g_stands_for = "generous" diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 6cfed6b0e7..b35ca73745 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -33,6 +33,10 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], native.cc_library( name = name, srcs = srcs, + defines = select({ + "//:grpc_no_ares": ["GRPC_ARES=0"], + "//conditions:default": [], + }), hdrs = hdrs + public_hdrs, deps = deps + ["//external:" + dep for dep in external_deps], copts = copts, |