diff options
author | makdharma <makdharma@users.noreply.github.com> | 2017-04-19 10:44:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 10:44:19 -0700 |
commit | 41d68a20d322b3fd876e6824e7572d202cd3a1c1 (patch) | |
tree | 331ec6e3385e723a07b3fe049843712634b7a12f /third_party | |
parent | 4589a2ebf9a430786ee7932af49406a13472bfb8 (diff) | |
parent | 72c4d0001948d5fe2199fcd4589ae1ab71e5f8d7 (diff) |
Merge pull request #10718 from makdharma/cares_osx_bazel
fix bazel build for osx
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/cares/cares.BUILD | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/third_party/cares/cares.BUILD b/third_party/cares/cares.BUILD index 48096aa055..3583720ef3 100644 --- a/third_party/cares/cares.BUILD +++ b/third_party/cares/cares.BUILD @@ -1,3 +1,8 @@ +config_setting( + name = "darwin", + values = {"cpu": "darwin"}, +) + cc_library( name = "ares", srcs = [ @@ -53,7 +58,6 @@ cc_library( ], hdrs = [ "ares_build.h", - "config_linux/ares_config.h", "cares/ares.h", "cares/ares_data.h", "cares/ares_dns.h", @@ -75,12 +79,17 @@ cc_library( "cares/bitncmp.h", "cares/config-win32.h", "cares/setup_once.h", - ], + ] + select({ + ":darwin": ["config_darwin/ares_config.h"], + "//conditions:default": ["config_linux/ares_config.h"], + }), includes = [ ".", - "config_linux", - "cares", - ], + "cares" + ] + select({ + ":darwin": ["config_darwin"], + "//conditions:default": ["config_linux"], + }), linkstatic = 1, visibility = [ "//visibility:public", |