diff options
author | thakis <thakis@chromium.org> | 2016-01-04 07:34:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-04 15:35:16 +0000 |
commit | 733d91de9d641917d15ebd0fbb7d153b1474ede3 (patch) | |
tree | dce9e9a4b8ef2e61acd2906ecdf043bbc3d4cbc3 /third_party/libwebp | |
parent | 2534c439dca66356d5cb7cc79bee2deeae017426 (diff) | |
download | chromium_src-733d91de9d641917d15ebd0fbb7d153b1474ede3.zip chromium_src-733d91de9d641917d15ebd0fbb7d153b1474ede3.tar.gz chromium_src-733d91de9d641917d15ebd0fbb7d153b1474ede3.tar.bz2 |
iOS: Fix -msse warnings when building libwebp.
iOS still uses Xcode for building, and in Xcode it's possible to switch
between device and simulator builds in the IDE -- so target_arch can't be
known at gyp time for iOS, it could be either ARM or x86.
In pratice, target_arch seems to be some x86 arch, and hence the iOS bots
complain `argument unused during compilation: '-msse2'` when doing device
builds.
Since performance in the simulator isn't critical, just disable the SSE
codepath in iOS builds. (GN doesn't have this problem since it doesn't support
generating Xcode projects, so don't touch that.)
BUG=573779
Review URL: https://codereview.chromium.org/1558913002
Cr-Commit-Position: refs/heads/master@{#367309}
Diffstat (limited to 'third_party/libwebp')
-rw-r--r-- | third_party/libwebp/libwebp.gyp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/third_party/libwebp/libwebp.gyp b/third_party/libwebp/libwebp.gyp index f6047be..7a8533a 100644 --- a/third_party/libwebp/libwebp.gyp +++ b/third_party/libwebp/libwebp.gyp @@ -83,7 +83,10 @@ ['OS == "android"', { 'dependencies': [ '../../build/android/ndk.gyp:cpu_features' ], }], - ['target_arch=="ia32" or target_arch=="x64"', { + # iOS uses the same project to generate build project for both device + # and simulator and do not use "target_arch" variable. Other platform + # set it correctly. + ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64")', { 'defines': [ 'WEBP_HAVE_SSE2', 'WEBP_HAVE_SSE41' ], }], ['order_profiling != 0', { @@ -113,7 +116,10 @@ 'dsp/yuv_sse2.c', ], 'conditions': [ - ['(target_arch=="ia32" or target_arch=="x64") and msan==0', { + # iOS uses the same project to generate build project for both device + # and simulator and do not use "target_arch" variable. Other platform + # set it correctly. + ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64") and msan==0', { 'cflags': [ '-msse2', ], 'xcode_settings': { 'OTHER_CFLAGS': [ '-msse2' ] }, }], @@ -144,7 +150,10 @@ 'VCCLCompilerTool': { 'AdditionalOptions': [ '-msse4.1' ] }, }, }], - ['(target_arch=="ia32" or target_arch=="x64") and msan==0', { + # iOS uses the same project to generate build project for both device + # and simulator and do not use "target_arch" variable. Other platform + # set it correctly. + ['OS!="ios" and (target_arch=="ia32" or target_arch=="x64") and msan==0', { 'cflags': [ '-msse4.1', ], 'xcode_settings': { 'OTHER_CFLAGS': [ '-msse4.1' ] }, }], |