From 7f3d4c6781d7d25b112068ca70b1627753ea256e Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Wed, 8 Aug 2012 21:55:20 +0000 Subject: [PATCH] Normalize x64 and ia32 sse2 behavior in libvpx. BUG=6947196 TEST=trybots Review URL: https://webrtc-codereview.appspot.com/708009 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2576 4adac7df-926f-26a2-2b94-8c16560cd09d --- third_party/libvpx/libvpx.gyp | 14 ++++++++++++-- third_party/libvpx/libvpx_srcs_x86_64.gypi | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/third_party/libvpx/libvpx.gyp b/third_party/libvpx/libvpx.gyp index 13981bb6a5..3428aaa400 100644 --- a/third_party/libvpx/libvpx.gyp +++ b/third_party/libvpx/libvpx.gyp @@ -40,7 +40,7 @@ # TODO(andrew): Hack to ensure we pass -msse2 to gcc on Linux for files # containing SSE intrinsics. This should be handled in the gyp generator # scripts somehow. Clang (default on Mac) doesn't require this. - ['target_arch=="ia32"', { + ['target_arch=="ia32" or target_arch=="x64"', { 'targets' : [ { 'target_name': 'libvpx_sse2', @@ -55,7 +55,16 @@ 'sources': [ 'source/libvpx/vp8/encoder/x86/denoising_sse2.c', ], - 'cflags': [ '-msse2', ], + 'conditions': [ + ['os_posix==1 and OS!="mac"', { + 'cflags': [ '-msse2', ], + }], + ['OS=="mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-msse2', ], + }, + }], + ], }, ], }], @@ -99,6 +108,7 @@ 'includes': [ 'libvpx_srcs_x86_64.gypi', ], + 'dependencies': [ 'libvpx_sse2', ], }], ], }, diff --git a/third_party/libvpx/libvpx_srcs_x86_64.gypi b/third_party/libvpx/libvpx_srcs_x86_64.gypi index 2e1f4659e1..884a692544 100644 --- a/third_party/libvpx/libvpx_srcs_x86_64.gypi +++ b/third_party/libvpx/libvpx_srcs_x86_64.gypi @@ -164,7 +164,8 @@ 'source/libvpx/vp8/encoder/treewriter.h', 'source/libvpx/vp8/encoder/x86/dct_mmx.asm', 'source/libvpx/vp8/encoder/x86/dct_sse2.asm', - 'source/libvpx/vp8/encoder/x86/denoising_sse2.c', + # Hack; refer to libvpx.gyp + #'source/libvpx/vp8/encoder/x86/denoising_sse2.c', 'source/libvpx/vp8/encoder/x86/encodeopt.asm', 'source/libvpx/vp8/encoder/x86/fwalsh_sse2.asm', 'source/libvpx/vp8/encoder/x86/quantize_mmx.asm',