diff options
Diffstat (limited to 'third_party/cares/cares.BUILD')
-rw-r--r-- | third_party/cares/cares.BUILD | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/third_party/cares/cares.BUILD b/third_party/cares/cares.BUILD index 978e9b1ed9..8cc01b64c4 100644 --- a/third_party/cares/cares.BUILD +++ b/third_party/cares/cares.BUILD @@ -3,6 +3,34 @@ config_setting( values = {"cpu": "darwin"}, ) +# Android is not officially supported through C++. +# This just helps with the build for now. +config_setting( + name = "android", + values = { + "crosstool_top": "//external:android/crosstool", + }, +) + +# iOS is not officially supported through C++. +# This just helps with the build for now. +config_setting( + name = "ios_x86_64", + values = {"cpu": "ios_x86_64"}, +) +config_setting( + name = "ios_armv7", + values = {"cpu": "ios_armv7"}, +) +config_setting( + name = "ios_armv7s", + values = {"cpu": "ios_armv7s"}, +) +config_setting( + name = "ios_arm64", + values = {"cpu": "ios_arm64"}, +) + cc_library( name = "ares", srcs = [ @@ -81,14 +109,24 @@ cc_library( "cares/nameser.h", "cares/setup_once.h", ] + select({ + ":ios_x86_64": ["config_darwin/ares_config.h"], + ":ios_armv7": ["config_darwin/ares_config.h"], + ":ios_armv7s": ["config_darwin/ares_config.h"], + ":ios_arm64": ["config_darwin/ares_config.h"], ":darwin": ["config_darwin/ares_config.h"], + ":android": ["config_android/ares_config.h"], "//conditions:default": ["config_linux/ares_config.h"], }), includes = [ ".", "cares" ] + select({ + ":ios_x86_64": ["config_darwin"], + ":ios_armv7": ["config_darwin"], + ":ios_armv7s": ["config_darwin"], + ":ios_arm64": ["config_darwin"], ":darwin": ["config_darwin"], + ":android": ["config_android"], "//conditions:default": ["config_linux"], }), linkstatic = 1, |