Index: webrtc/modules/audio_device/BUILD.gn |
diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn |
index 81242105ac43997eb5c0e14cfd2574a5a6518b71..a8867afe5fca65da94ced9653ea97af4db089709 100644 |
--- a/webrtc/modules/audio_device/BUILD.gn |
+++ b/webrtc/modules/audio_device/BUILD.gn |
@@ -24,7 +24,37 @@ config("audio_device_config") { |
} |
} |
+config("audio_device_warnings_config") { |
+ if (is_win && is_clang) { |
+ cflags = [ |
+ # Disable warnings failing when compiling with Clang on Windows. |
+ # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 |
+ "-Wno-bool-conversion", |
+ "-Wno-delete-non-virtual-dtor", |
+ "-Wno-logical-op-parentheses", |
+ "-Wno-microsoft-extra-qualification", |
+ "-Wno-microsoft-goto", |
+ "-Wno-missing-braces", |
+ "-Wno-parentheses-equality", |
+ "-Wno-reorder", |
+ "-Wno-shift-overflow", |
+ "-Wno-tautological-compare", |
+ |
+ # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6265 |
+ # for -Wno-thread-safety-analysis |
+ "-Wno-thread-safety-analysis", |
+ "-Wno-unused-private-field", |
+ ] |
+ } |
+} |
+ |
source_set("audio_device") { |
+ configs += [ "../..:common_config" ] |
+ public_configs = [ |
+ "../..:common_inherited_config", |
+ ":audio_device_config", |
+ ] |
+ |
deps = [ |
"../..:webrtc_common", |
"../../base:rtc_base", |
@@ -193,23 +223,7 @@ source_set("audio_device") { |
"msdmo.lib", |
] |
} |
- if (is_win && is_clang) { |
- cflags += [ |
- # Disable warnings failing when compiling with Clang on Windows. |
- # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366 |
- "-Wno-bool-conversion", |
- "-Wno-delete-non-virtual-dtor", |
- "-Wno-logical-op-parentheses", |
- "-Wno-microsoft-extra-qualification", |
- "-Wno-microsoft-goto", |
- "-Wno-missing-braces", |
- "-Wno-parentheses-equality", |
- "-Wno-reorder", |
- "-Wno-shift-overflow", |
- "-Wno-tautological-compare", |
- "-Wno-unused-private-field", |
- ] |
- } |
+ configs += [ ":audio_device_warnings_config" ] |
} |
} else { |
defines = [ "WEBRTC_DUMMY_AUDIO_BUILD" ] |
@@ -223,12 +237,6 @@ source_set("audio_device") { |
] |
} |
- configs += [ "../..:common_config" ] |
- public_configs = [ |
- "../..:common_inherited_config", |
- ":audio_device_config", |
- ] |
- |
if (is_clang) { |
# Suppress warnings from Chrome's Clang plugins. |
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |