Merge pull request #13358 from vjpai/config_noares

Allow bazel builds to disable c-ares at command line or bazelrc
pull/13301/merge
Vijay Pai 7 years ago committed by GitHub
commit 54e8f37e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      BUILD
  2. 4
      bazel/grpc_build_system.bzl

@ -33,6 +33,11 @@ load(
"grpc_generate_one_off_targets", "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 # This should be updated along with build.yaml
g_stands_for = "generous" g_stands_for = "generous"

@ -33,6 +33,10 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
native.cc_library( native.cc_library(
name = name, name = name,
srcs = srcs, srcs = srcs,
defines = select({
"//:grpc_no_ares": ["GRPC_ARES=0"],
"//conditions:default": [],
}),
hdrs = hdrs + public_hdrs, hdrs = hdrs + public_hdrs,
deps = deps + ["//external:" + dep for dep in external_deps], deps = deps + ["//external:" + dep for dep in external_deps],
copts = copts, copts = copts,

Loading…
Cancel
Save