From f2497cf5175c9325d3c3a5727f36e31b7f2f4f1c Mon Sep 17 00:00:00 2001 From: Henrik Kjellander Date: Thu, 16 Apr 2015 08:57:16 +0200 Subject: [PATCH] Fix unknown option '-msse2' warning R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43169004 Cr-Commit-Position: refs/heads/master@{#9016} --- webrtc/common_audio/BUILD.gn | 4 +++- webrtc/common_audio/common_audio.gyp | 12 ++++++++---- webrtc/modules/audio_processing/BUILD.gn | 4 +++- .../modules/audio_processing/audio_processing.gypi | 12 ++++++++---- webrtc/modules/desktop_capture/desktop_capture.gypi | 9 +++++---- 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn index 544a142ee3..ec4a00dfbd 100644 --- a/webrtc/common_audio/BUILD.gn +++ b/webrtc/common_audio/BUILD.gn @@ -195,7 +195,9 @@ if (current_cpu == "x86" || current_cpu == "x64") { "resampler/sinc_resampler_sse.cc", ] - cflags = [ "-msse2" ] + if (is_posix) { + cflags = [ "-msse2" ] + } configs += [ "..:common_inherited_config" ] diff --git a/webrtc/common_audio/common_audio.gyp b/webrtc/common_audio/common_audio.gyp index 3742f2f3b3..36e6a65ebd 100644 --- a/webrtc/common_audio/common_audio.gyp +++ b/webrtc/common_audio/common_audio.gyp @@ -201,10 +201,14 @@ 'fir_filter_sse.cc', 'resampler/sinc_resampler_sse.cc', ], - 'cflags': ['-msse2',], - 'xcode_settings': { - 'OTHER_CFLAGS': ['-msse2',], - }, + 'conditions': [ + ['os_posix==1', { + 'cflags': [ '-msse2', ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-msse2', ], + }, + }], + ], }, ], # targets }], diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn index 016c684063..551d895fa5 100644 --- a/webrtc/modules/audio_processing/BUILD.gn +++ b/webrtc/modules/audio_processing/BUILD.gn @@ -223,7 +223,9 @@ if (current_cpu == "x86" || current_cpu == "x64") { "aec/aec_rdft_sse2.c", ] - cflags = [ "-msse2" ] + if (is_posix) { + cflags = [ "-msse2" ] + } configs += [ "../..:common_config" ] public_configs = [ "../..:common_inherited_config" ] diff --git a/webrtc/modules/audio_processing/audio_processing.gypi b/webrtc/modules/audio_processing/audio_processing.gypi index c10ee78308..ec0926e825 100644 --- a/webrtc/modules/audio_processing/audio_processing.gypi +++ b/webrtc/modules/audio_processing/audio_processing.gypi @@ -232,10 +232,14 @@ 'aec/aec_core_sse2.c', 'aec/aec_rdft_sse2.c', ], - 'cflags': ['-msse2',], - 'xcode_settings': { - 'OTHER_CFLAGS': ['-msse2',], - }, + 'conditions': [ + ['os_posix==1', { + 'cflags': [ '-msse2', ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-msse2', ], + }, + }], + ], }, ], }], diff --git a/webrtc/modules/desktop_capture/desktop_capture.gypi b/webrtc/modules/desktop_capture/desktop_capture.gypi index 15393761f8..b92447c349 100644 --- a/webrtc/modules/desktop_capture/desktop_capture.gypi +++ b/webrtc/modules/desktop_capture/desktop_capture.gypi @@ -146,10 +146,11 @@ "differ_block_sse2.h", ], 'conditions': [ - [ 'os_posix == 1 and OS != "mac"', { - 'cflags': [ - '-msse2', - ], + ['os_posix==1', { + 'cflags': [ '-msse2', ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-msse2', ], + }, }], ], },