diff options
Diffstat (limited to 'third_party/zlib.BUILD')
-rw-r--r-- | third_party/zlib.BUILD | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD index 279e6395b0..8509668891 100644 --- a/third_party/zlib.BUILD +++ b/third_party/zlib.BUILD @@ -2,6 +2,18 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # BSD/MIT-like license (for zlib) +config_setting( + name = "windows", + values = {"cpu": "x64_windows"}, + visibility = ["//visibility:public"], +) + +config_setting( + name = "windows_msvc", + values = {"cpu": "x64_windows_msvc"}, + visibility = ["//visibility:public"], +) + cc_library( name = "zlib", srcs = [ @@ -32,9 +44,13 @@ cc_library( "zutil.h", ], hdrs = ["zlib.h"], - copts = [ - "-Wno-shift-negative-value", - "-Wno-implicit-function-declaration", - ], + copts = select({ + ":windows": [], + ":windows_msvc": [], + "//conditions:default": [ + "-Wno-shift-negative-value", + "-Wno-implicit-function-declaration", + ], + }), includes = ["."], ) |