summaryrefslogtreecommitdiffstats
path: root/third_party/zlib
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-11-18 15:21:17 -0800
committerNico Weber <thakis@chromium.org>2014-11-18 23:22:15 +0000
commitf3b5bb2d25abb3bacb246531b6cfa6d36abb17b2 (patch)
tree94d2369f64ad74c744dfafacee198f40f020a778 /third_party/zlib
parent4625bc465953505c2cee19cf2cd3c1a1c0746db0 (diff)
downloadchromium_src-f3b5bb2d25abb3bacb246531b6cfa6d36abb17b2.zip
chromium_src-f3b5bb2d25abb3bacb246531b6cfa6d36abb17b2.tar.gz
chromium_src-f3b5bb2d25abb3bacb246531b6cfa6d36abb17b2.tar.bz2
Fix fallout from https://codereview.chromium.org/678423002/
* Let BUILD.gn build the same files on Windows as the gyp file does. * Remove -msse2 flag, that's on globally * On win/clang, pass -msse4.2 -mclmul flags to fix clang/wi complaining about unsupported intrinsics BUG=82385 R=dpranke@chromium.org, hans@chromium.org TBR=brettw Review URL: https://codereview.chromium.org/742583003 Cr-Commit-Position: refs/heads/master@{#304695}
Diffstat (limited to 'third_party/zlib')
-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'],
}],
],