summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--third_party/zlib/BUILD.gn6
-rw-r--r--third_party/zlib/zlib.gyp22
2 files changed, 21 insertions, 7 deletions
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index d07fd9a..810fbb7 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -7,9 +7,11 @@ config("zlib_config") {
}
static_library("zlib_x86_simd") {
- if (!is_win && (cpu_arch == "x86" || cpu_arch == "x64")) {
+ if (!is_ios && (cpu_arch == "x86" || cpu_arch == "x64")) {
sources = [ "crc_folding.c", "fill_window_sse.c" ]
- cflags = [ "-msse2", "-msse4.2", "-mpclmul" ]
+ if (!is_win || is_clang) {
+ cflags = [ "-msse4.2", "-mpclmul" ]
+ }
} else {
sources = [ "simd_stub.c"]
}
diff --git a/third_party/zlib/zlib.gyp b/third_party/zlib/zlib.gyp
index 22a48a3..bb478ce 100644
--- a/third_party/zlib/zlib.gyp
+++ b/third_party/zlib/zlib.gyp
@@ -9,15 +9,27 @@
'type': 'static_library',
'conditions': [
['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', {
- 'cflags' : ["-msse2", "-msse4.2", "-mpclmul"],
+ 'cflags' : ['-msse4.2', '-mpclmul'],
'xcode_settings' : {
- 'OTHER_CFLAGS' : ["-msse4.2", "-mpclmul"],
+ 'OTHER_CFLAGS' : ['-msse4.2', '-mpclmul'],
},
- 'sources' : [ 'crc_folding.c',
- 'fill_window_sse.c']
+ 'sources' : [
+ 'crc_folding.c',
+ 'fill_window_sse.c',
+ ],
+ 'conditions': [
+ ['OS=="win" and clang==1', {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'AdditionalOptions': [ '-msse4.2', '-mpclmul' ],
+ },
+ },
+ }],
+ ],
}, {
'sources' : [ 'simd_stub.c' ],
- }], ['OS=="android"', {
+ }],
+ ['OS=="android"', {
'toolsets': ['target', 'host'],
}],
],