From 737c023e427718a8681c16cc7bd8b46d488bd798 Mon Sep 17 00:00:00 2001 From: "andrew@webrtc.org" Date: Tue, 14 Feb 2012 19:57:50 +0000 Subject: [PATCH] Properly disable sse2 source on non-x86. BUG= TEST=build on Linux. Review URL: https://webrtc-codereview.appspot.com/387008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1684 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_processing/aec/aec.gypi | 40 +++++++++------- .../main/source/video_processing.gypi | 46 +++++++++++-------- 2 files changed, 49 insertions(+), 37 deletions(-) diff --git a/src/modules/audio_processing/aec/aec.gypi b/src/modules/audio_processing/aec/aec.gypi index ed333aed9..2e34c5bb8 100644 --- a/src/modules/audio_processing/aec/aec.gypi +++ b/src/modules/audio_processing/aec/aec.gypi @@ -46,23 +46,29 @@ }], ], }, - { - 'target_name': 'aec_sse2', - 'type': '<(library)', - 'sources': [ - 'aec_core_sse2.c', - 'aec_rdft_sse2.c', + ], + 'conditions': [ + ['target_arch=="ia32" or target_arch=="x64"', { + 'targets': [ + { + 'target_name': 'aec_sse2', + 'type': '<(library)', + 'sources': [ + 'aec_core_sse2.c', + 'aec_rdft_sse2.c', + ], + 'conditions': [ + ['os_posix==1 and OS!="mac"', { + 'cflags': [ '-msse2', ], + }], + ['OS=="mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-msse2', ], + }, + }], + ], + }, ], - 'conditions': [ - ['os_posix==1 and OS!="mac"', { - 'cflags': [ '-msse2', ], - }], - ['OS=="mac"', { - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-msse2', ], - }, - }], - ], - }, + }], ], } diff --git a/src/modules/video_processing/main/source/video_processing.gypi b/src/modules/video_processing/main/source/video_processing.gypi index dda0a780a..3bc03bce1 100644 --- a/src/modules/video_processing/main/source/video_processing.gypi +++ b/src/modules/video_processing/main/source/video_processing.gypi @@ -56,27 +56,33 @@ }], ], }, - { - 'target_name': 'video_processing_sse2', - 'type': '<(library)', - 'sources': [ - 'content_analysis_sse2.cc', + ], + 'conditions': [ + ['target_arch=="ia32" or target_arch=="x64"', { + 'targets': [ + { + 'target_name': 'video_processing_sse2', + 'type': '<(library)', + 'sources': [ + 'content_analysis_sse2.cc', + ], + 'include_dirs': [ + '../interface', + '../../../interface', + ], + 'conditions': [ + ['os_posix==1 and OS!="mac"', { + 'cflags': [ '-msse2', ], + }], + ['OS=="mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-msse2', ], + }, + }], + ], + }, ], - 'include_dirs': [ - '../interface', - '../../../interface', - ], - 'conditions': [ - ['os_posix==1 and OS!="mac"', { - 'cflags': [ '-msse2', ], - }], - ['OS=="mac"', { - 'xcode_settings': { - 'OTHER_CFLAGS': [ '-msse2', ], - }, - }], - ], - }, + }], ], }