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',