Fix unknown option '-msse2' warning on Windows.
Analogous to:
https://webrtc-codereview.appspot.com/43169004/
R=tmoniuszko@opera.com
Review URL: https://webrtc-codereview.appspot.com/49169004
Patch from Tomasz Moniuszko <tmoniuszko@opera.com>.
diff --git a/dl/BUILD.gn b/dl/BUILD.gn
index 04b40d3..7dc755c 100644
--- a/dl/BUILD.gn
+++ b/dl/BUILD.gn
@@ -102,7 +102,9 @@
}
if (current_cpu == "x86" || current_cpu == "x64") {
- cflags += [ "-msse2" ]
+ if (is_posix) {
+ cflags += [ "-msse2" ]
+ }
sources += [
# Real 32-bit floating-point FFT.
diff --git a/dl/dl.gyp b/dl/dl.gyp
index 37e94a7..27d7508 100644
--- a/dl/dl.gyp
+++ b/dl/dl.gyp
@@ -120,8 +120,13 @@
],
}],
['target_arch=="ia32" or target_arch=="x64"', {
- 'cflags': [
- '-msse2',
+ 'conditions': [
+ ['os_posix==1', {
+ 'cflags': [ '-msse2', ],
+ 'xcode_settings': {
+ 'OTHER_CFLAGS': [ '-msse2', ],
+ },
+ }],
],
'sources': [
# Real 32-bit floating-point FFT.