Add support for SSE intrinsics on gcc in libvpx.

BUG=none
TEST=build on Linux with -Dtarget_arch=ia32 -Ddisable_sse2=1, trybots

Review URL: https://webrtc-codereview.appspot.com/646009

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2398 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2012-06-12 08:33:53 +00:00
parent d41851480c
commit f0d4696ab3
2 changed files with 25 additions and 1 deletions

View File

@ -33,6 +33,28 @@
],
},
'conditions': [
# 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"', {
'targets' : [
{
'target_name': 'libvpx_sse2',
'type': 'static_library',
'include_dirs': [
'source/config/<(OS)/<(target_arch)',
'source/libvpx',
'source/libvpx/vp8/common',
'source/libvpx/vp8/decoder',
'source/libvpx/vp8/encoder',
],
'sources': [
'source/libvpx/vp8/encoder/x86/denoising_sse2.c',
],
'cflags': [ '-msse2', ],
},
],
}],
[ '(OS=="linux" or OS=="mac" or OS=="win") and target_arch!="arm"', {
'targets': [
{
@ -67,6 +89,7 @@
'includes': [
'libvpx_srcs_x86.gypi',
],
'dependencies': [ 'libvpx_sse2', ],
}],
[ 'target_arch=="x64"', {
'includes': [

View File

@ -163,7 +163,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',