aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/cares/cares.BUILD
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2018-06-14 13:33:59 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2018-06-14 13:33:59 -0700
commit657a3eb98ba7481785fc3b5bad803f3d4a27e90d (patch)
tree6460e6d13ec7573f87b3b422e9addaadaec075ea /third_party/cares/cares.BUILD
parentebb23c6e69628c61b531a591f5bf076f0e40b6d2 (diff)
parentc2e40173b611fb668bb459514dd66c2a9d7dff15 (diff)
Merge branch 'master' of github.com:grpc/grpc into nanopb_build_cleanup
Diffstat (limited to 'third_party/cares/cares.BUILD')
-rw-r--r--third_party/cares/cares.BUILD22
1 files changed, 20 insertions, 2 deletions
diff --git a/third_party/cares/cares.BUILD b/third_party/cares/cares.BUILD
index 3ac02875e6..fd14007e80 100644
--- a/third_party/cares/cares.BUILD
+++ b/third_party/cares/cares.BUILD
@@ -3,6 +3,11 @@ config_setting(
values = {"cpu": "darwin"},
)
+config_setting(
+ name = "windows",
+ values = {"cpu": "x64_windows"},
+)
+
# Android is not officially supported through C++.
# This just helps with the build for now.
config_setting(
@@ -49,6 +54,7 @@ genrule(
":ios_armv7s": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":ios_arm64": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":darwin": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
+ ":windows": ["@com_github_grpc_grpc//third_party/cares:config_windows/ares_config.h"],
":android": ["@com_github_grpc_grpc//third_party/cares:config_android/ares_config.h"],
"//conditions:default": ["@com_github_grpc_grpc//third_party/cares:config_linux/ares_config.h"],
}),
@@ -138,10 +144,22 @@ cc_library(
copts = [
"-D_GNU_SOURCE",
"-D_HAS_EXCEPTIONS=0",
- "-DNOMINMAX",
"-DHAVE_CONFIG_H",
- ],
+ ] + select({
+ ":windows": [
+ "-DNOMINMAX",
+ "-D_CRT_SECURE_NO_DEPRECATE",
+ "-D_CRT_NONSTDC_NO_DEPRECATE",
+ "-D_WIN32_WINNT=0x0600",
+ ],
+ "//conditions:default": [],
+ }),
+ defines = ["CARES_STATICLIB"],
includes = ["."],
+ linkopts = select({
+ ":windows": ["-defaultlib:ws2_32.lib"],
+ "//conditions:default": [],
+ }),
linkstatic = 1,
visibility = [
"//visibility:public",