diff options
Diffstat (limited to 'third_party/jpeg')
-rw-r--r-- | third_party/jpeg/jpeg.BUILD | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/third_party/jpeg/jpeg.BUILD b/third_party/jpeg/jpeg.BUILD index 78e03eadcf..f6078052ec 100644 --- a/third_party/jpeg/jpeg.BUILD +++ b/third_party/jpeg/jpeg.BUILD @@ -9,17 +9,20 @@ load("@%ws%//third_party:common.bzl", "template_rule") libjpegturbo_nocopts = "-[W]error" +WIN_COPTS = [ + "/Ox", + "/w14711", # function 'function' selected for inline expansion + "/w14710", # 'function' : function not inlined +] + libjpegturbo_copts = select({ ":android": [ "-O2", "-fPIE", "-w", ], - ":windows": [ - "/Ox", - "/w14711", # function 'function' selected for inline expansion - "/w14710", # 'function' : function not inlined - ], + ":windows": WIN_COPTS, + ":windows_msvc": WIN_COPTS, "//conditions:default": [ "-O3", "-w", @@ -370,6 +373,7 @@ genrule( outs = ["jconfig.h"], cmd = select({ ":windows": "cp $(location jconfig_win.h) $@", + ":windows_msvc": "cp $(location jconfig_win.h) $@", ":k8": "cp $(location jconfig_nowin_simd.h) $@", ":armeabi-v7a": "cp $(location jconfig_nowin_simd.h) $@", ":arm64-v8a": "cp $(location jconfig_nowin_simd.h) $@", @@ -386,6 +390,7 @@ genrule( outs = ["jconfigint.h"], cmd = select({ ":windows": "cp $(location jconfigint_win.h) $@", + ":windows_msvc": "cp $(location jconfigint_win.h) $@", "//conditions:default": "cp $(location jconfigint_nowin.h) $@", }), ) @@ -482,5 +487,10 @@ config_setting( config_setting( name = "windows", + values = {"cpu": "x64_windows"}, +) + +config_setting( + name = "windows_msvc", values = {"cpu": "x64_windows_msvc"}, ) |