Makarand Dharmapurikar | 72c4d00 | 2017-04-18 14:51:43 -0700 | [diff] [blame] | 1 | config_setting( |
| 2 | name = "darwin", |
| 3 | values = {"cpu": "darwin"}, |
| 4 | ) |
| 5 | |
Param Reddy | b96287a | 2017-10-14 12:43:31 -0700 | [diff] [blame^] | 6 | config_setting( |
| 7 | name = "ios_x86_64", |
| 8 | values = {"cpu": "ios_x86_64"}, |
| 9 | ) |
| 10 | config_setting( |
| 11 | name = "ios_armv7", |
| 12 | values = {"cpu": "ios_armv7"}, |
| 13 | ) |
| 14 | config_setting( |
| 15 | name = "ios_armv7s", |
| 16 | values = {"cpu": "ios_armv7s"}, |
| 17 | ) |
| 18 | config_setting( |
| 19 | name = "ios_arm64", |
| 20 | values = {"cpu": "ios_arm64"}, |
| 21 | ) |
| 22 | |
Yuchen Zeng | 4c702ed | 2017-01-23 10:30:10 -0800 | [diff] [blame] | 23 | cc_library( |
| 24 | name = "ares", |
| 25 | srcs = [ |
| 26 | "cares/ares__close_sockets.c", |
| 27 | "cares/ares__get_hostent.c", |
| 28 | "cares/ares__read_line.c", |
| 29 | "cares/ares__timeval.c", |
| 30 | "cares/ares_cancel.c", |
| 31 | "cares/ares_create_query.c", |
| 32 | "cares/ares_data.c", |
| 33 | "cares/ares_destroy.c", |
| 34 | "cares/ares_expand_name.c", |
| 35 | "cares/ares_expand_string.c", |
| 36 | "cares/ares_fds.c", |
| 37 | "cares/ares_free_hostent.c", |
| 38 | "cares/ares_free_string.c", |
| 39 | "cares/ares_getenv.c", |
| 40 | "cares/ares_gethostbyaddr.c", |
| 41 | "cares/ares_gethostbyname.c", |
| 42 | "cares/ares_getnameinfo.c", |
| 43 | "cares/ares_getopt.c", |
| 44 | "cares/ares_getsock.c", |
| 45 | "cares/ares_init.c", |
| 46 | "cares/ares_library_init.c", |
| 47 | "cares/ares_llist.c", |
| 48 | "cares/ares_mkquery.c", |
| 49 | "cares/ares_nowarn.c", |
| 50 | "cares/ares_options.c", |
| 51 | "cares/ares_parse_a_reply.c", |
| 52 | "cares/ares_parse_aaaa_reply.c", |
| 53 | "cares/ares_parse_mx_reply.c", |
| 54 | "cares/ares_parse_naptr_reply.c", |
| 55 | "cares/ares_parse_ns_reply.c", |
| 56 | "cares/ares_parse_ptr_reply.c", |
| 57 | "cares/ares_parse_soa_reply.c", |
| 58 | "cares/ares_parse_srv_reply.c", |
| 59 | "cares/ares_parse_txt_reply.c", |
| 60 | "cares/ares_platform.c", |
| 61 | "cares/ares_process.c", |
| 62 | "cares/ares_query.c", |
| 63 | "cares/ares_search.c", |
| 64 | "cares/ares_send.c", |
| 65 | "cares/ares_strcasecmp.c", |
| 66 | "cares/ares_strdup.c", |
| 67 | "cares/ares_strerror.c", |
| 68 | "cares/ares_timeout.c", |
| 69 | "cares/ares_version.c", |
| 70 | "cares/ares_writev.c", |
| 71 | "cares/bitncmp.c", |
| 72 | "cares/inet_net_pton.c", |
| 73 | "cares/inet_ntop.c", |
| 74 | "cares/windows_port.c", |
| 75 | ], |
| 76 | hdrs = [ |
| 77 | "ares_build.h", |
Yuchen Zeng | 4c702ed | 2017-01-23 10:30:10 -0800 | [diff] [blame] | 78 | "cares/ares.h", |
| 79 | "cares/ares_data.h", |
| 80 | "cares/ares_dns.h", |
| 81 | "cares/ares_getenv.h", |
| 82 | "cares/ares_getopt.h", |
| 83 | "cares/ares_inet_net_pton.h", |
| 84 | "cares/ares_iphlpapi.h", |
| 85 | "cares/ares_ipv6.h", |
| 86 | "cares/ares_library_init.h", |
| 87 | "cares/ares_llist.h", |
| 88 | "cares/ares_nowarn.h", |
| 89 | "cares/ares_platform.h", |
| 90 | "cares/ares_private.h", |
| 91 | "cares/ares_rules.h", |
| 92 | "cares/ares_setup.h", |
| 93 | "cares/ares_strcasecmp.h", |
| 94 | "cares/ares_strdup.h", |
| 95 | "cares/ares_version.h", |
| 96 | "cares/bitncmp.h", |
| 97 | "cares/config-win32.h", |
Makarand Dharmapurikar | 1d8e465 | 2017-06-12 13:18:17 -0700 | [diff] [blame] | 98 | "cares/nameser.h", |
Yuchen Zeng | 4c702ed | 2017-01-23 10:30:10 -0800 | [diff] [blame] | 99 | "cares/setup_once.h", |
Makarand Dharmapurikar | 72c4d00 | 2017-04-18 14:51:43 -0700 | [diff] [blame] | 100 | ] + select({ |
Param Reddy | b96287a | 2017-10-14 12:43:31 -0700 | [diff] [blame^] | 101 | ":ios_x86_64": ["config_darwin/ares_config.h"], |
| 102 | ":ios_armv7": ["config_darwin/ares_config.h"], |
| 103 | ":ios_armv7s": ["config_darwin/ares_config.h"], |
| 104 | ":ios_arm64": ["config_darwin/ares_config.h"], |
Makarand Dharmapurikar | 72c4d00 | 2017-04-18 14:51:43 -0700 | [diff] [blame] | 105 | ":darwin": ["config_darwin/ares_config.h"], |
| 106 | "//conditions:default": ["config_linux/ares_config.h"], |
| 107 | }), |
Yuchen Zeng | 4c702ed | 2017-01-23 10:30:10 -0800 | [diff] [blame] | 108 | includes = [ |
| 109 | ".", |
Makarand Dharmapurikar | 72c4d00 | 2017-04-18 14:51:43 -0700 | [diff] [blame] | 110 | "cares" |
| 111 | ] + select({ |
Param Reddy | b96287a | 2017-10-14 12:43:31 -0700 | [diff] [blame^] | 112 | ":ios_x86_64": ["config_darwin"], |
| 113 | ":ios_armv7": ["config_darwin"], |
| 114 | ":ios_armv7s": ["config_darwin"], |
| 115 | ":ios_arm64": ["config_darwin"], |
Makarand Dharmapurikar | 72c4d00 | 2017-04-18 14:51:43 -0700 | [diff] [blame] | 116 | ":darwin": ["config_darwin"], |
| 117 | "//conditions:default": ["config_linux"], |
| 118 | }), |
Yuchen Zeng | 4c702ed | 2017-01-23 10:30:10 -0800 | [diff] [blame] | 119 | linkstatic = 1, |
| 120 | visibility = [ |
| 121 | "//visibility:public", |
| 122 | ], |
| 123 | copts = [ |
| 124 | "-D_GNU_SOURCE", |
| 125 | "-D_HAS_EXCEPTIONS=0", |
| 126 | "-DNOMINMAX", |
| 127 | "-DHAVE_CONFIG_H", |
| 128 | ], |
| 129 | ) |