From 38a2132b02a76b8012e17ba61b7afa97268949c1 Mon Sep 17 00:00:00 2001 From: ehmaldonado Date: Fri, 2 Sep 2016 04:10:34 -0700 Subject: [PATCH] GN: Introduce templates. Defines the rtc_executable, rtc_source_set, rtc_test and rtc_static_library templates. These templates provide no functionality yet, but will enable common configuration to be introduced, avoiding repetition in every target Changes summary: - Prepend rtc_ to test, source_set, executable and static_library targets - Change "configs -= [" to "suppressed_configs += [" - Include webrtc/build/webrtc.gni where it wasn't included yet - Delete import("//testing/test.gni"), since rtc_test makes it unnecessary. BUG=webrtc:6187 TBR=henrik.lundin@webrtc.org,tommi@webrtc.org NOTRY=True Review-Url: https://codereview.webrtc.org/2301053002 Cr-Commit-Position: refs/heads/master@{#14043} --- webrtc/BUILD.gn | 47 ++++--- webrtc/api/BUILD.gn | 15 +-- webrtc/audio/BUILD.gn | 8 +- webrtc/base/BUILD.gn | 16 +-- webrtc/build/webrtc.gni | 95 +++++++++++++ webrtc/call/BUILD.gn | 8 +- webrtc/common_audio/BUILD.gn | 19 ++- webrtc/common_video/BUILD.gn | 9 +- webrtc/examples/BUILD.gn | 32 +++-- webrtc/libjingle/xmllite/BUILD.gn | 4 +- webrtc/libjingle/xmpp/BUILD.gn | 4 +- webrtc/media/BUILD.gn | 13 +- webrtc/modules/BUILD.gn | 9 +- webrtc/modules/audio_coding/BUILD.gn | 125 +++++++++--------- .../modules/audio_conference_mixer/BUILD.gn | 6 +- webrtc/modules/audio_device/BUILD.gn | 6 +- webrtc/modules/audio_mixer/BUILD.gn | 6 +- webrtc/modules/audio_processing/BUILD.gn | 26 ++-- webrtc/modules/bitrate_controller/BUILD.gn | 4 +- webrtc/modules/congestion_controller/BUILD.gn | 4 +- webrtc/modules/desktop_capture/BUILD.gn | 8 +- webrtc/modules/media_file/BUILD.gn | 4 +- webrtc/modules/pacing/BUILD.gn | 6 +- .../modules/remote_bitrate_estimator/BUILD.gn | 9 +- webrtc/modules/rtp_rtcp/BUILD.gn | 6 +- webrtc/modules/utility/BUILD.gn | 4 +- webrtc/modules/video_capture/BUILD.gn | 17 ++- webrtc/modules/video_coding/BUILD.gn | 32 ++--- webrtc/modules/video_processing/BUILD.gn | 12 +- webrtc/p2p/BUILD.gn | 13 +- webrtc/pc/BUILD.gn | 9 +- webrtc/sdk/BUILD.gn | 6 +- webrtc/stats/BUILD.gn | 9 +- webrtc/system_wrappers/BUILD.gn | 19 ++- webrtc/test/BUILD.gn | 40 +++--- webrtc/test/fuzzers/BUILD.gn | 6 +- webrtc/tools/BUILD.gn | 43 +++--- webrtc/video/BUILD.gn | 9 +- webrtc/voice_engine/BUILD.gn | 15 +-- 39 files changed, 403 insertions(+), 320 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 9857423f30..eef896c520 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -11,7 +11,6 @@ import("//build/config/linux/pkg_config.gni") import("//build/config/sanitizers/sanitizers.gni") import("build/webrtc.gni") -import("//testing/test.gni") import("//third_party/protobuf/proto_library.gni") # Contains the defines and includes in common.gypi that are duplicated both as @@ -240,7 +239,7 @@ config("common_objc") { } if (!is_ios || !build_with_chromium) { - source_set("webrtc") { + rtc_source_set("webrtc") { sources = [ "call.h", "config.h", @@ -287,7 +286,7 @@ if (!is_ios || !build_with_chromium) { } if (!build_with_chromium) { - executable("webrtc_tests") { + rtc_executable("webrtc_tests") { testonly = true deps = [ ":webrtc", @@ -297,7 +296,7 @@ if (!build_with_chromium) { ] } - executable("video_loopback") { + rtc_executable("video_loopback") { testonly = true sources = [ "test/run_test.h", @@ -323,12 +322,12 @@ if (!build_with_chromium) { if (is_clang && !is_nacl) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } -source_set("webrtc_common") { +rtc_source_set("webrtc_common") { sources = [ "audio_sink.h", "common.cc", @@ -347,7 +346,7 @@ source_set("webrtc_common") { if (is_clang && !is_nacl) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } @@ -360,7 +359,7 @@ if (rtc_enable_protobuf) { } } -source_set("rtc_event_log") { +rtc_source_set("rtc_event_log") { sources = [ "call/rtc_event_log.cc", "call/rtc_event_log.h", @@ -384,12 +383,12 @@ source_set("rtc_event_log") { if (is_clang && !is_nacl) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } if (rtc_enable_protobuf) { - source_set("rtc_event_log_parser") { + rtc_source_set("rtc_event_log_parser") { sources = [ "call/rtc_event_log_parser.cc", "call/rtc_event_log_parser.h", @@ -406,7 +405,7 @@ if (rtc_enable_protobuf) { if (is_clang && !is_nacl) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } @@ -436,7 +435,7 @@ if (rtc_include_tests) { } } - test("rtc_unittests") { + rtc_test("rtc_unittests") { testonly = true sources = [ "base/array_view_unittest.cc", @@ -597,7 +596,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -639,7 +638,7 @@ if (rtc_include_tests) { } } - test("xmllite_xmpp_unittests") { + rtc_test("xmllite_xmpp_unittests") { configs += [ ":common_config", ":rtc_unittests_config", @@ -649,7 +648,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -702,7 +701,7 @@ if (rtc_include_tests) { } } - test("video_engine_tests") { + rtc_test("video_engine_tests") { testonly = true deps = [ "audio:audio_tests", @@ -715,7 +714,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] @@ -728,7 +727,7 @@ if (rtc_include_tests) { } } - source_set("video_quality_test") { + rtc_source_set("video_quality_test") { testonly = true configs += [ ":common_config" ] public_configs = [ ":common_inherited_config" ] @@ -747,7 +746,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } @@ -778,7 +777,7 @@ if (rtc_include_tests) { } } - test("webrtc_perf_tests") { + rtc_test("webrtc_perf_tests") { testonly = true configs += [ ":common_config", @@ -787,7 +786,7 @@ if (rtc_include_tests) { public_configs = [ ":common_inherited_config" ] if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] + suppressed_configs += [ "//build/config/compiler:default_optimization" ] configs += [ "//build/config/compiler:optimize_max" ] } @@ -828,11 +827,11 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } - test("webrtc_nonparallel_tests") { + rtc_test("webrtc_nonparallel_tests") { testonly = true configs += [ ":common_config", @@ -869,7 +868,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn index d14fe1f19e..176df9e305 100644 --- a/webrtc/api/BUILD.gn +++ b/webrtc/api/BUILD.gn @@ -7,7 +7,6 @@ # be found in the AUTHORS file in the root of the source tree. import("../build/webrtc.gni") -import("//testing/test.gni") if (is_android) { import("//build/config/android/config.gni") import("//build/config/android/rules.gni") @@ -19,7 +18,7 @@ group("api") { ] } -source_set("call_api") { +rtc_source_set("call_api") { sources = [ "call/audio_receive_stream.h", "call/audio_send_stream.h", @@ -47,7 +46,7 @@ config("libjingle_peerconnection_warnings_config") { } } -source_set("libjingle_peerconnection") { +rtc_source_set("libjingle_peerconnection") { cflags = [] sources = [ "audiotrack.cc", @@ -128,7 +127,7 @@ source_set("libjingle_peerconnection") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -167,7 +166,7 @@ if (is_android && !build_with_chromium) { } } - source_set("libjingle_peerconnection_jni") { + rtc_source_set("libjingle_peerconnection_jni") { sources = [ "android/jni/androidmediacodeccommon.h", "android/jni/androidmediadecoder_jni.cc", @@ -199,7 +198,7 @@ if (is_android && !build_with_chromium) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ + suppressed_configs += [ "//build/config/clang:extra_warnings", "//build/config/clang:find_bad_constructs", ] @@ -332,7 +331,7 @@ if (rtc_include_tests) { } } - test("peerconnection_unittests") { + rtc_test("peerconnection_unittests") { testonly = true sources = [ "datachannel_unittest.cc", @@ -381,7 +380,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } # TODO(jschuh): Bug 1348: fix this warning. diff --git a/webrtc/audio/BUILD.gn b/webrtc/audio/BUILD.gn index 762eb5f86e..ead25f8e3b 100644 --- a/webrtc/audio/BUILD.gn +++ b/webrtc/audio/BUILD.gn @@ -8,7 +8,7 @@ import("../build/webrtc.gni") -source_set("audio") { +rtc_source_set("audio") { sources = [ "audio_receive_stream.cc", "audio_receive_stream.h", @@ -26,7 +26,7 @@ source_set("audio") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -37,7 +37,7 @@ source_set("audio") { ] } if (rtc_include_tests) { - source_set("audio_tests") { + rtc_source_set("audio_tests") { testonly = true sources = [ "audio_receive_stream_unittest.cc", @@ -52,7 +52,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 5da158a4a5..075e4ccaf4 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -90,7 +90,7 @@ if (!rtc_build_ssl) { } # The subset of rtc_base approved for use outside of libjingle. -static_library("rtc_base_approved") { +rtc_static_library("rtc_base_approved") { defines = [] libs = [] deps = [] @@ -198,7 +198,7 @@ config("enable_libevent_config") { defines = [ "WEBRTC_BUILD_LIBEVENT" ] } -static_library("rtc_task_queue") { +rtc_static_library("rtc_task_queue") { public_deps = [ ":rtc_base_approved", ] @@ -258,7 +258,7 @@ config("rtc_base_warnings_config") { } } -static_library("rtc_base") { +rtc_static_library("rtc_base") { cflags = [] cflags_cc = [] libs = [] @@ -428,7 +428,7 @@ static_library("rtc_base") { # TODO(henrike): issue 3307, make rtc_base build with the Chromium default # compiler settings. - configs -= [ "//build/config/compiler:chromium_code" ] + suppressed_configs += [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] if (!is_win) { cflags += [ "-Wno-uninitialized" ] @@ -681,11 +681,11 @@ static_library("rtc_base") { } if (is_win && is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } -source_set("gtest_prod") { +rtc_source_set("gtest_prod") { sources = [ "gtest_prod_util.h", ] @@ -706,7 +706,7 @@ if (rtc_include_tests) { } } - source_set("rtc_base_tests_utils") { + rtc_source_set("rtc_base_tests_utils") { testonly = true sources = [ # Also use this as a convenient dumping ground for misc files that are @@ -743,7 +743,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 25d7258268..49a3bc774c 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/build/webrtc.gni @@ -10,6 +10,7 @@ import("//build/config/arm.gni") import("//build/config/features.gni") import("//build/config/mips.gni") import("//build_overrides/webrtc.gni") +import("//testing/test.gni") declare_args() { # Disable this to avoid building the Opus audio codec. @@ -148,3 +149,97 @@ declare_args() { rtc_libvpx_dir = "//third_party/libvpx" rtc_libyuv_dir = "//third_party/libyuv" rtc_opus_dir = "//third_party/opus" + +############################################################################### +# Templates +# + +# Points to //webrtc/ in webrtc stand-alone or to //third_party/webrtc/ in +# chromium. +# We need absolute paths for all configs in templates as they are shared in +# different subdirectories. +webrtc_root = get_path_info("../", "abspath") + +# Common configs to remove or add in all rtc targets. +rtc_remove_configs = [] +rtc_add_configs = [] + +set_defaults("rtc_test") { + configs = [] + suppressed_configs = [] +} + +set_defaults("rtc_source_set") { + configs = [] + suppressed_configs = [] +} + +set_defaults("rtc_executable") { + configs = [] + suppressed_configs = [] +} + +set_defaults("rtc_static_library") { + configs = [] + suppressed_configs = [] +} + +template("rtc_test") { + test(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "suppressed_configs", + ]) + configs += invoker.configs + configs += rtc_add_configs + configs -= rtc_remove_configs + configs -= invoker.suppressed_configs + } +} + +template("rtc_source_set") { + source_set(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "suppressed_configs", + ]) + configs += invoker.configs + configs += rtc_add_configs + configs -= rtc_remove_configs + configs -= invoker.suppressed_configs + } +} + +template("rtc_executable") { + executable(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "suppressed_configs", + ]) + configs += invoker.configs + configs += rtc_add_configs + configs -= rtc_remove_configs + configs -= invoker.suppressed_configs + } +} + +template("rtc_static_library") { + static_library(target_name) { + forward_variables_from(invoker, + "*", + [ + "configs", + "suppressed_configs", + ]) + configs += invoker.configs + configs += rtc_add_configs + configs -= rtc_remove_configs + configs -= invoker.suppressed_configs + } +} diff --git a/webrtc/call/BUILD.gn b/webrtc/call/BUILD.gn index eed2b07730..ee708c5707 100644 --- a/webrtc/call/BUILD.gn +++ b/webrtc/call/BUILD.gn @@ -8,7 +8,7 @@ import("../build/webrtc.gni") -source_set("call") { +rtc_source_set("call") { sources = [ "bitrate_allocator.cc", "call.cc", @@ -22,7 +22,7 @@ source_set("call") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -39,7 +39,7 @@ source_set("call") { } if (rtc_include_tests) { - source_set("call_tests") { + rtc_source_set("call_tests") { testonly = true sources = [ "bitrate_allocator_unittest.cc", @@ -57,7 +57,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn index cc5a7702f2..35f715a018 100644 --- a/webrtc/common_audio/BUILD.gn +++ b/webrtc/common_audio/BUILD.gn @@ -8,7 +8,6 @@ import("//build/config/arm.gni") import("../build/webrtc.gni") -import("//testing/test.gni") config("common_audio_config") { include_dirs = [ @@ -18,7 +17,7 @@ config("common_audio_config") { ] } -source_set("common_audio") { +rtc_source_set("common_audio") { sources = [ "audio_converter.cc", "audio_converter.h", @@ -183,7 +182,7 @@ source_set("common_audio") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (current_cpu == "x86" || current_cpu == "x64") { @@ -192,7 +191,7 @@ source_set("common_audio") { } if (current_cpu == "x86" || current_cpu == "x64") { - source_set("common_audio_sse2") { + rtc_source_set("common_audio_sse2") { sources = [ "fir_filter_sse.cc", "resampler/sinc_resampler_sse.cc", @@ -207,13 +206,13 @@ if (current_cpu == "x86" || current_cpu == "x64") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } if (rtc_build_with_neon) { - source_set("common_audio_neon") { + rtc_source_set("common_audio_neon") { sources = [ "fir_filter_neon.cc", "resampler/sinc_resampler_neon.cc", @@ -226,7 +225,7 @@ if (rtc_build_with_neon) { # Enable compilation for the NEON instruction set. This is needed # since //build/config/arm.gni only enables NEON for iOS, not Android. # This provides the same functionality as webrtc/build/arm_neon.gypi. - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] cflags = [ "-mfpu=neon" ] } @@ -245,13 +244,13 @@ if (rtc_build_with_neon) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } if (rtc_include_tests) { - test("common_audio_unittests") { + rtc_test("common_audio_unittests") { testonly = true sources = [ @@ -298,7 +297,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn index ed5a738782..cb1f024723 100644 --- a/webrtc/common_video/BUILD.gn +++ b/webrtc/common_video/BUILD.gn @@ -7,7 +7,6 @@ # be found in the AUTHORS file in the root of the source tree. import("../build/webrtc.gni") -import("//testing/test.gni") config("common_video_config") { include_dirs = [ @@ -16,7 +15,7 @@ config("common_video_config") { ] } -source_set("common_video") { +rtc_source_set("common_video") { sources = [ "bitrate_adjuster.cc", "h264/h264_common.cc", @@ -53,7 +52,7 @@ source_set("common_video") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -96,7 +95,7 @@ if (rtc_include_tests) { } } - test("common_video_unittests") { + rtc_test("common_video_unittests") { testonly = true sources = [ @@ -118,7 +117,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn index b4d2bbeea7..6eb3f6f0cd 100644 --- a/webrtc/examples/BUILD.gn +++ b/webrtc/examples/BUILD.gn @@ -6,6 +6,7 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. +import("../build/webrtc.gni") if (is_android) { import("//build/config/android/config.gni") import("//build/config/android/rules.gni") @@ -14,9 +15,6 @@ if (is_android) { } else if (is_ios) { import("//build/config/ios/rules.gni") } -if (is_linux || is_win) { - import("//webrtc/build/webrtc.gni") -} if (is_linux) { import("//build/config/linux/pkg_config.gni") } @@ -136,7 +134,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { include_dirs = [ "objc/AppRTCDemo/common" ] } - source_set("apprtc_common") { + rtc_source_set("apprtc_common") { sources = [ "objc/AppRTCDemo/common/ARDUtilities.h", "objc/AppRTCDemo/common/ARDUtilities.m", @@ -173,7 +171,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { } } - source_set("apprtc_signaling") { + rtc_source_set("apprtc_signaling") { sources = [ "objc/AppRTCDemo/ARDAppClient+Internal.h", "objc/AppRTCDemo/ARDAppClient.h", @@ -293,7 +291,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { } if (is_mac) { - source_set("AppRTCDemo_app") { + rtc_source_set("AppRTCDemo_app") { sources = [ "objc/AppRTCDemo/mac/APPRTCAppDelegate.h", "objc/AppRTCDemo/mac/APPRTCAppDelegate.m", @@ -356,7 +354,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { } } - source_set("socketrocket") { + rtc_source_set("socketrocket") { sources = [ "objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h", "objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m", @@ -406,7 +404,7 @@ if (is_linux || is_win) { } } - executable("peerconnection_client") { + rtc_executable("peerconnection_client") { sources = [ "peerconnection/client/conductor.cc", "peerconnection/client/conductor.h", @@ -418,7 +416,7 @@ if (is_linux || is_win) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_win) { sources += [ @@ -456,7 +454,7 @@ if (is_linux || is_win) { deps += [ "//third_party/jsoncpp" ] } } - executable("peerconnection_server") { + rtc_executable("peerconnection_server") { sources = [ "peerconnection/server/data_socket.cc", "peerconnection/server/data_socket.h", @@ -475,10 +473,10 @@ if (is_linux || is_win) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } - executable("relayserver") { + rtc_executable("relayserver") { sources = [ "relayserver/relayserver_main.cc", ] @@ -492,10 +490,10 @@ if (is_linux || is_win) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } - executable("turnserver") { + rtc_executable("turnserver") { sources = [ "turnserver/turnserver_main.cc", ] @@ -509,10 +507,10 @@ if (is_linux || is_win) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } - executable("stunserver") { + rtc_executable("stunserver") { sources = [ "stunserver/stunserver_main.cc", ] @@ -526,7 +524,7 @@ if (is_linux || is_win) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/libjingle/xmllite/BUILD.gn b/webrtc/libjingle/xmllite/BUILD.gn index c35dde69e0..936e2b9b9a 100644 --- a/webrtc/libjingle/xmllite/BUILD.gn +++ b/webrtc/libjingle/xmllite/BUILD.gn @@ -14,7 +14,7 @@ group("xmllite") { ] } -source_set("rtc_xmllite") { +rtc_source_set("rtc_xmllite") { sources = [ "qname.cc", "qname.h", @@ -49,6 +49,6 @@ source_set("rtc_xmllite") { if (!build_with_chromium && is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } diff --git a/webrtc/libjingle/xmpp/BUILD.gn b/webrtc/libjingle/xmpp/BUILD.gn index 4c29fc083b..87152ef5bd 100644 --- a/webrtc/libjingle/xmpp/BUILD.gn +++ b/webrtc/libjingle/xmpp/BUILD.gn @@ -30,7 +30,7 @@ config("xmpp_inherited_config") { ] } -source_set("rtc_xmpp") { +rtc_source_set("rtc_xmpp") { cflags = [] sources = [ "asyncsocket.h", @@ -148,7 +148,7 @@ source_set("rtc_xmpp") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } diff --git a/webrtc/media/BUILD.gn b/webrtc/media/BUILD.gn index df4e3d2d00..1a526a6a49 100644 --- a/webrtc/media/BUILD.gn +++ b/webrtc/media/BUILD.gn @@ -8,7 +8,6 @@ import("//build/config/linux/pkg_config.gni") import("../build/webrtc.gni") -import("//testing/test.gni") group("media") { deps = [ @@ -43,7 +42,7 @@ if (is_linux && rtc_use_gtk) { } } -source_set("rtc_media") { +rtc_source_set("rtc_media") { defines = [] libs = [] deps = [] @@ -127,7 +126,7 @@ source_set("rtc_media") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ + suppressed_configs += [ "//build/config/clang:extra_warnings", "//build/config/clang:find_bad_constructs", ] @@ -227,7 +226,7 @@ if (rtc_include_tests) { } } - source_set("rtc_unittest_main") { + rtc_source_set("rtc_unittest_main") { testonly = true include_dirs = [] @@ -268,7 +267,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps += [ @@ -320,7 +319,7 @@ if (rtc_include_tests) { } } - test("rtc_media_unittests") { + rtc_test("rtc_media_unittests") { testonly = true defines = [] @@ -369,7 +368,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ + suppressed_configs += [ "//build/config/clang:extra_warnings", "//build/config/clang:find_bad_constructs", ] diff --git a/webrtc/modules/BUILD.gn b/webrtc/modules/BUILD.gn index 6c19b072ae..367c8eed09 100644 --- a/webrtc/modules/BUILD.gn +++ b/webrtc/modules/BUILD.gn @@ -8,7 +8,6 @@ import("../build/webrtc.gni") import("audio_coding/audio_coding.gni") -import("//testing/test.gni") declare_args() { # Desktop capturer is supported only on Windows, OSX and Linux. @@ -52,7 +51,7 @@ if (rtc_include_tests) { } } - test("modules_tests") { + rtc_test("modules_tests") { testonly = true configs += [ "..:common_config" ] @@ -113,7 +112,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_win) { cflags = [ @@ -240,7 +239,7 @@ if (rtc_include_tests) { } } - test("modules_unittests") { + rtc_test("modules_unittests") { testonly = true defines = audio_coding_defines @@ -574,7 +573,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_win) { diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index 1dbc929e8f..db97e24d01 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -9,7 +9,6 @@ import("../../build/webrtc.gni") import("audio_coding.gni") import("//build/config/arm.gni") -import("//testing/test.gni") import("//third_party/protobuf/proto_library.gni") audio_codec_deps = [ @@ -40,7 +39,7 @@ audio_coding_deps = audio_codec_deps + [ "../../system_wrappers", ] -source_set("audio_decoder_factory_interface") { +rtc_source_set("audio_decoder_factory_interface") { sources = [ "codecs/audio_decoder_factory.h", "codecs/audio_format.cc", @@ -53,7 +52,7 @@ source_set("audio_decoder_factory_interface") { ] } -source_set("builtin_audio_decoder_factory") { +rtc_source_set("builtin_audio_decoder_factory") { sources = [ "codecs/builtin_audio_decoder_factory.cc", "codecs/builtin_audio_decoder_factory.h", @@ -67,7 +66,7 @@ source_set("builtin_audio_decoder_factory") { defines = audio_codec_defines } -source_set("rent_a_codec") { +rtc_source_set("rent_a_codec") { sources = [ "acm2/acm_codec_database.cc", "acm2/acm_codec_database.h", @@ -87,7 +86,7 @@ config("audio_coding_config") { ] } -source_set("audio_coding") { +rtc_source_set("audio_coding") { sources = [ "acm2/acm_common_defs.h", "acm2/acm_receiver.cc", @@ -135,7 +134,7 @@ source_set("audio_coding") { defines = audio_coding_defines } -source_set("audio_decoder_interface") { +rtc_source_set("audio_decoder_interface") { sources = [ "codecs/audio_decoder.cc", "codecs/audio_decoder.h", @@ -148,7 +147,7 @@ source_set("audio_decoder_interface") { ] } -source_set("audio_encoder_interface") { +rtc_source_set("audio_encoder_interface") { sources = [ "codecs/audio_encoder.cc", "codecs/audio_encoder.h", @@ -168,7 +167,7 @@ config("cng_config") { ] } -source_set("cng") { +rtc_source_set("cng") { sources = [ "codecs/cng/audio_encoder_cng.cc", "codecs/cng/audio_encoder_cng.h", @@ -193,7 +192,7 @@ config("red_config") { include_dirs = [ "codecs/red" ] } -source_set("red") { +rtc_source_set("red") { sources = [ "codecs/red/audio_encoder_copy_red.cc", "codecs/red/audio_encoder_copy_red.h", @@ -219,7 +218,7 @@ config("g711_config") { ] } -source_set("g711") { +rtc_source_set("g711") { sources = [ "codecs/g711/audio_decoder_pcm.cc", "codecs/g711/audio_decoder_pcm.h", @@ -251,7 +250,7 @@ config("g722_config") { ] } -source_set("g722") { +rtc_source_set("g722") { sources = [ "codecs/g722/audio_decoder_g722.cc", "codecs/g722/audio_decoder_g722.h", @@ -284,7 +283,7 @@ config("ilbc_config") { ] } -source_set("ilbc") { +rtc_source_set("ilbc") { sources = [ "codecs/ilbc/abs_quant.c", "codecs/ilbc/abs_quant.h", @@ -446,7 +445,7 @@ source_set("ilbc") { ] } -source_set("isac_common") { +rtc_source_set("isac_common") { sources = [ "codecs/isac/audio_encoder_isac_t.h", "codecs/isac/audio_encoder_isac_t_impl.h", @@ -463,7 +462,7 @@ config("isac_config") { ] } -source_set("isac") { +rtc_source_set("isac") { sources = [ "codecs/isac/main/include/audio_decoder_isac.h", "codecs/isac/main/include/audio_encoder_isac.h", @@ -549,7 +548,7 @@ config("isac_fix_config") { ] } -source_set("isac_fix") { +rtc_source_set("isac_fix") { sources = [ "codecs/isac/fix/include/audio_decoder_isacfix.h", "codecs/isac/fix/include/audio_encoder_isacfix.h", @@ -661,7 +660,7 @@ source_set("isac_fix") { } if (rtc_build_with_neon) { - source_set("isac_neon") { + rtc_source_set("isac_neon") { sources = [ "codecs/isac/fix/source/entropy_coding_neon.c", "codecs/isac/fix/source/filterbanks_neon.c", @@ -674,7 +673,7 @@ if (rtc_build_with_neon) { # Enable compilation for the NEON instruction set. This is needed # since //build/config/arm.gni only enables NEON for iOS, not Android. # This provides the same functionality as webrtc/build/arm_neon.gypi. - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] cflags = [ "-mfpu=neon" ] } @@ -703,7 +702,7 @@ config("pcm16b_config") { ] } -source_set("pcm16b") { +rtc_source_set("pcm16b") { sources = [ "codecs/pcm16b/audio_decoder_pcm16b.cc", "codecs/pcm16b/audio_decoder_pcm16b.h", @@ -731,7 +730,7 @@ config("opus_config") { include_dirs = [ "../../.." ] } -source_set("webrtc_opus") { +rtc_source_set("webrtc_opus") { sources = [ "codecs/opus/audio_decoder_opus.cc", "codecs/opus/audio_decoder_opus.h", @@ -768,7 +767,7 @@ config("neteq_config") { ] } -source_set("neteq") { +rtc_source_set("neteq") { sources = [ "neteq/accelerate.cc", "neteq/accelerate.h", @@ -888,7 +887,7 @@ source_set("neteq") { } if (rtc_include_tests) { - source_set("acm_receive_test") { + rtc_source_set("acm_receive_test") { testonly = true sources = [ "acm2/acm_receive_test_oldapi.cc", @@ -907,7 +906,7 @@ if (rtc_include_tests) { ] } - source_set("acm_send_test") { + rtc_source_set("acm_send_test") { testonly = true sources = [ "acm2/acm_send_test_oldapi.cc", @@ -926,7 +925,7 @@ if (rtc_include_tests) { ] } - executable("delay_test") { + rtc_executable("delay_test") { testonly = true sources = [ "test/Channel.cc", @@ -951,7 +950,7 @@ if (rtc_include_tests) { ] } # delay_test - executable("insert_packet_with_timing") { + rtc_executable("insert_packet_with_timing") { testonly = true sources = [ "test/Channel.cc", @@ -965,7 +964,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -996,7 +995,7 @@ if (rtc_include_tests) { } } - test("audio_decoder_unittests") { + rtc_test("audio_decoder_unittests") { testonly = true sources = [ "neteq/audio_decoder_unittest.cc", @@ -1007,7 +1006,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [] @@ -1044,7 +1043,7 @@ if (rtc_include_tests) { proto_out_dir = "webrtc/audio_coding/neteq" } - source_set("rtc_event_log_source") { + rtc_source_set("rtc_event_log_source") { testonly = true sources = [ "neteq/tools/rtc_event_log_source.cc", @@ -1054,7 +1053,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins # (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -1065,7 +1064,7 @@ if (rtc_include_tests) { ] } - test("neteq_rtpplay") { + rtc_test("neteq_rtpplay") { testonly = true defines = [] deps = [] @@ -1076,7 +1075,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins # (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_win) { @@ -1096,7 +1095,7 @@ if (rtc_include_tests) { } } - test("audio_codec_speed_tests") { + rtc_test("audio_codec_speed_tests") { testonly = true defines = [] deps = [] @@ -1110,7 +1109,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins # (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_android) { @@ -1128,7 +1127,7 @@ if (rtc_include_tests) { ] } - source_set("neteq_test_support") { + rtc_source_set("neteq_test_support") { testonly = true sources = [ "neteq/tools/neteq_external_decoder_test.cc", @@ -1141,13 +1140,13 @@ if (rtc_include_tests) { public_configs = [ "../..:common_inherited_config" ] if (!is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] + suppressed_configs += [ "//build/config/compiler:default_optimization" ] configs += [ "//build/config/compiler:optimize_max" ] } if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -1159,7 +1158,7 @@ if (rtc_include_tests) { ] } - source_set("neteq_quality_test_support") { + rtc_source_set("neteq_quality_test_support") { testonly = true sources = [ "neteq/tools/neteq_quality_test.cc", @@ -1171,7 +1170,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -1186,7 +1185,7 @@ if (rtc_include_tests) { include_dirs = [ "tools" ] } - source_set("neteq_unittest_tools") { + rtc_source_set("neteq_unittest_tools") { testonly = true sources = [ "neteq/tools/audio_checksum.h", @@ -1229,7 +1228,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -1243,7 +1242,7 @@ if (rtc_include_tests) { } } - source_set("neteq_test_tools") { + rtc_source_set("neteq_test_tools") { testonly = true sources = [ "neteq/test/NETEQTEST_DummyRTPpacket.cc", @@ -1297,7 +1296,7 @@ if (rtc_include_tests) { ] } - executable("RTPencode") { + rtc_executable("RTPencode") { testonly = true deps = [ @@ -1333,7 +1332,7 @@ if (rtc_include_tests) { } } - executable("RTPchange") { + rtc_executable("RTPchange") { testonly = true sources = [ @@ -1346,7 +1345,7 @@ if (rtc_include_tests) { ] } - executable("rtpcat") { + rtc_executable("rtpcat") { testonly = true sources = [ @@ -1361,7 +1360,7 @@ if (rtc_include_tests) { ] } - executable("RTPtimeshift") { + rtc_executable("RTPtimeshift") { testonly = true sources = [ @@ -1375,7 +1374,7 @@ if (rtc_include_tests) { ] } - executable("RTPjitter") { + rtc_executable("RTPjitter") { testonly = true deps = [ "../..:webrtc_common", @@ -1387,7 +1386,7 @@ if (rtc_include_tests) { ] } - executable("rtp_analyze") { + rtc_executable("rtp_analyze") { testonly = true sources = [ @@ -1407,11 +1406,11 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } - executable("neteq_opus_quality_test") { + rtc_executable("neteq_opus_quality_test") { testonly = true sources = [ @@ -1430,7 +1429,7 @@ if (rtc_include_tests) { ] } - executable("neteq_speed_test") { + rtc_executable("neteq_speed_test") { testonly = true sources = [ @@ -1447,7 +1446,7 @@ if (rtc_include_tests) { ] } - executable("audio_classifier_test") { + rtc_executable("audio_classifier_test") { testonly = true sources = [ "neteq/test/audio_classifier_test.cc", @@ -1460,7 +1459,7 @@ if (rtc_include_tests) { ] } - executable("neteq_ilbc_quality_test") { + rtc_executable("neteq_ilbc_quality_test") { testonly = true sources = [ @@ -1480,7 +1479,7 @@ if (rtc_include_tests) { ] } - executable("neteq_isac_quality_test") { + rtc_executable("neteq_isac_quality_test") { testonly = true sources = [ @@ -1498,7 +1497,7 @@ if (rtc_include_tests) { ] } - executable("neteq_pcmu_quality_test") { + rtc_executable("neteq_pcmu_quality_test") { testonly = true sources = [ @@ -1516,7 +1515,7 @@ if (rtc_include_tests) { ] } - executable("isac_fix_test") { + rtc_executable("isac_fix_test") { testonly = true sources = [ @@ -1547,7 +1546,7 @@ if (rtc_include_tests) { } } - executable("isac_test") { + rtc_executable("isac_test") { testonly = true sources = [ @@ -1570,7 +1569,7 @@ if (rtc_include_tests) { configs += [ ":isac_test_warnings_config" ] } - executable("g711_test") { + rtc_executable("g711_test") { testonly = true sources = [ @@ -1586,7 +1585,7 @@ if (rtc_include_tests) { ] } - executable("g722_test") { + rtc_executable("g722_test") { testonly = true sources = [ @@ -1603,7 +1602,7 @@ if (rtc_include_tests) { ] } - executable("isac_api_test") { + rtc_executable("isac_api_test") { testonly = true sources = [ @@ -1627,7 +1626,7 @@ if (rtc_include_tests) { ] } - executable("isac_switch_samprate_test") { + rtc_executable("isac_switch_samprate_test") { testonly = true sources = [ @@ -1651,7 +1650,7 @@ if (rtc_include_tests) { ] } - executable("ilbc_test") { + rtc_executable("ilbc_test") { testonly = true sources = [ @@ -1667,7 +1666,7 @@ if (rtc_include_tests) { ] } - executable("webrtc_opus_fec_test") { + rtc_executable("webrtc_opus_fec_test") { testonly = true sources = [ @@ -1687,7 +1686,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/modules/audio_conference_mixer/BUILD.gn b/webrtc/modules/audio_conference_mixer/BUILD.gn index 36391c7abc..72379facbe 100644 --- a/webrtc/modules/audio_conference_mixer/BUILD.gn +++ b/webrtc/modules/audio_conference_mixer/BUILD.gn @@ -6,6 +6,8 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. +import("../../build/webrtc.gni") + config("audio_conference_mixer_config") { visibility = [ ":*" ] # Only targets in this file can depend on this. include_dirs = [ @@ -14,7 +16,7 @@ config("audio_conference_mixer_config") { ] } -source_set("audio_conference_mixer") { +rtc_source_set("audio_conference_mixer") { sources = [ "include/audio_conference_mixer.h", "include/audio_conference_mixer_defines.h", @@ -39,7 +41,7 @@ source_set("audio_conference_mixer") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index a8867afe5f..6e82045c67 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -48,7 +48,7 @@ config("audio_device_warnings_config") { } } -source_set("audio_device") { +rtc_source_set("audio_device") { configs += [ "../..:common_config" ] public_configs = [ "../..:common_inherited_config", @@ -240,14 +240,14 @@ source_set("audio_device") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } # These tests do not work on ios, see # https://bugs.chromium.org/p/webrtc/issues/detail?id=4755 if (rtc_include_tests && !is_ios) { - executable("audio_device_tests") { + rtc_executable("audio_device_tests") { testonly = true sources = [ "test/audio_device_test_api.cc", diff --git a/webrtc/modules/audio_mixer/BUILD.gn b/webrtc/modules/audio_mixer/BUILD.gn index 3dd5e01b69..51fd785ee0 100644 --- a/webrtc/modules/audio_mixer/BUILD.gn +++ b/webrtc/modules/audio_mixer/BUILD.gn @@ -6,11 +6,13 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. +import("../../build/webrtc.gni") + config("audio_conference_mixer_config") { include_dirs = [ "../../modules/include" ] } -source_set("audio_mixer") { +rtc_source_set("audio_mixer") { sources = [ "audio_frame_manipulator.cc", "audio_frame_manipulator.h", @@ -35,7 +37,7 @@ source_set("audio_mixer") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn index fcbb44a831..66a7c2b964 100644 --- a/webrtc/modules/audio_processing/BUILD.gn +++ b/webrtc/modules/audio_processing/BUILD.gn @@ -17,7 +17,7 @@ declare_args() { aec_untrusted_delay_for_testing = false } -source_set("audio_processing") { +rtc_source_set("audio_processing") { sources = [ "aec/aec_core.cc", "aec/aec_core.h", @@ -254,7 +254,7 @@ if (rtc_enable_protobuf) { } if (current_cpu == "x86" || current_cpu == "x64") { - source_set("audio_processing_sse2") { + rtc_source_set("audio_processing_sse2") { sources = [ "aec/aec_core_sse2.cc", "aec/aec_rdft_sse2.cc", @@ -276,7 +276,7 @@ if (current_cpu == "x86" || current_cpu == "x64") { } if (rtc_build_with_neon) { - source_set("audio_processing_neon") { + rtc_source_set("audio_processing_neon") { sources = [ "aec/aec_core_neon.cc", "aec/aec_rdft_neon.cc", @@ -288,7 +288,7 @@ if (rtc_build_with_neon) { # Enable compilation for the NEON instruction set. This is needed # since //build/config/arm.gni only enables NEON for iOS, not Android. # This provides the same functionality as webrtc/build/arm_neon.gypi. - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] cflags = [ "-mfpu=neon" ] } @@ -317,7 +317,7 @@ if (rtc_build_with_neon) { } if (rtc_include_tests) { - executable("audioproc") { + rtc_executable("audioproc") { testonly = true sources = [ "test/process_test.cc", @@ -340,7 +340,7 @@ if (rtc_include_tests) { ] } # audioproc - executable("unpack_aecdump") { + rtc_executable("unpack_aecdump") { testonly = true sources = [ "test/unpack.cc", @@ -361,7 +361,7 @@ if (rtc_include_tests) { ] } # unpack_aecdump - executable("audioproc_f") { + rtc_executable("audioproc_f") { testonly = true sources = [ "test/aec_dump_based_simulator.cc", @@ -390,7 +390,7 @@ if (rtc_include_tests) { ] } # audioproc_f - source_set("audioproc_test_utils") { + rtc_source_set("audioproc_test_utils") { testonly = true sources = [ "test/audio_buffer_tools.cc", @@ -408,7 +408,7 @@ if (rtc_include_tests) { ] } - executable("transient_suppression_test") { + rtc_executable("transient_suppression_test") { testonly = true sources = [ "transient/file_utils.cc", @@ -424,7 +424,7 @@ if (rtc_include_tests) { ] } - executable("click_annotate") { + rtc_executable("click_annotate") { testonly = true sources = [ "transient/click_annotate.cc", @@ -437,7 +437,7 @@ if (rtc_include_tests) { ] } - executable("nonlinear_beamformer_test") { + rtc_executable("nonlinear_beamformer_test") { testonly = true sources = [ "beamformer/nonlinear_beamformer_test.cc", @@ -451,7 +451,7 @@ if (rtc_include_tests) { } if (rtc_enable_intelligibility_enhancer) { - executable("intelligibility_proc") { + rtc_executable("intelligibility_proc") { testonly = true sources = [ "intelligibility/test/intelligibility_proc.cc", @@ -475,7 +475,7 @@ if (rtc_include_tests) { proto_out_dir = "webrtc/modules/audio_processing" } - source_set("audioproc_protobuf_utils") { + rtc_source_set("audioproc_protobuf_utils") { sources = [ "test/protobuf_utils.cc", "test/protobuf_utils.h", diff --git a/webrtc/modules/bitrate_controller/BUILD.gn b/webrtc/modules/bitrate_controller/BUILD.gn index 029f54170f..2d5e982cb7 100644 --- a/webrtc/modules/bitrate_controller/BUILD.gn +++ b/webrtc/modules/bitrate_controller/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -source_set("bitrate_controller") { +rtc_source_set("bitrate_controller") { sources = [ "bitrate_controller_impl.cc", "bitrate_controller_impl.h", @@ -27,7 +27,7 @@ source_set("bitrate_controller") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/congestion_controller/BUILD.gn b/webrtc/modules/congestion_controller/BUILD.gn index add1a4d974..c8d6847171 100644 --- a/webrtc/modules/congestion_controller/BUILD.gn +++ b/webrtc/modules/congestion_controller/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -source_set("congestion_controller") { +rtc_source_set("congestion_controller") { sources = [ "congestion_controller.cc", "delay_based_bwe.cc", @@ -27,7 +27,7 @@ source_set("congestion_controller") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn index 61a3de2fe1..8e3f36d2df 100644 --- a/webrtc/modules/desktop_capture/BUILD.gn +++ b/webrtc/modules/desktop_capture/BUILD.gn @@ -12,7 +12,7 @@ import("../../build/webrtc.gni") use_desktop_capture_differ_sse2 = !is_ios && (current_cpu == "x86" || current_cpu == "x64") -source_set("primitives") { +rtc_source_set("primitives") { sources = [ "desktop_capture_types.h", "desktop_frame.cc", @@ -26,7 +26,7 @@ source_set("primitives") { public_configs = [ "../..:common_inherited_config" ] } -source_set("desktop_capture") { +rtc_source_set("desktop_capture") { sources = [ "cropped_desktop_frame.cc", "cropped_desktop_frame.h", @@ -154,7 +154,7 @@ source_set("desktop_capture") { if (is_clang && !is_nacl) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -171,7 +171,7 @@ source_set("desktop_capture") { if (use_desktop_capture_differ_sse2) { # Have to be compiled as a separate target because it needs to be compiled # with SSE2 enabled. - source_set("desktop_capture_differ_sse2") { + rtc_source_set("desktop_capture_differ_sse2") { visibility = [ ":*" ] sources = [ "differ_block_sse2.cc", diff --git a/webrtc/modules/media_file/BUILD.gn b/webrtc/modules/media_file/BUILD.gn index 84f094fd11..c4d5424a59 100644 --- a/webrtc/modules/media_file/BUILD.gn +++ b/webrtc/modules/media_file/BUILD.gn @@ -12,7 +12,7 @@ config("media_file_config") { visibility = [ ":*" ] # Only targets in this file can depend on this. } -source_set("media_file") { +rtc_source_set("media_file") { sources = [ "media_file.h", "media_file_defines.h", @@ -34,7 +34,7 @@ source_set("media_file") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/pacing/BUILD.gn b/webrtc/modules/pacing/BUILD.gn index 0354c64fcb..0cf8e6e70d 100644 --- a/webrtc/modules/pacing/BUILD.gn +++ b/webrtc/modules/pacing/BUILD.gn @@ -6,7 +6,9 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. -source_set("pacing") { +import("../../build/webrtc.gni") + +rtc_source_set("pacing") { sources = [ "bitrate_prober.cc", "bitrate_prober.h", @@ -22,7 +24,7 @@ source_set("pacing") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn index bbf74aba7c..ea4f38e88f 100644 --- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn +++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn @@ -7,14 +7,13 @@ # be found in the AUTHORS file in the root of the source tree. import("../../build/webrtc.gni") -import("//testing/test.gni") declare_args() { # Set this to true to enable BWE test logging. rtc_enable_bwe_test_logging = false } -source_set("remote_bitrate_estimator") { +rtc_source_set("remote_bitrate_estimator") { sources = [ "aimd_rate_control.cc", "aimd_rate_control.h", @@ -52,7 +51,7 @@ source_set("remote_bitrate_estimator") { if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -63,7 +62,7 @@ source_set("remote_bitrate_estimator") { } if (rtc_include_tests) { - source_set("bwe_simulator") { + rtc_source_set("bwe_simulator") { testonly = true sources = [ "test/bwe.cc", @@ -106,7 +105,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_win) { diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index fb270b315a..ff55791a2f 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -source_set("rtp_rtcp") { +rtc_source_set("rtp_rtcp") { sources = [ "include/fec_receiver.h", "include/receive_statistics.h", @@ -160,7 +160,7 @@ source_set("rtp_rtcp") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -182,7 +182,7 @@ source_set("rtp_rtcp") { } if (rtc_include_tests) { - executable("test_packet_masks_metrics") { + rtc_executable("test_packet_masks_metrics") { testonly = true sources = [ diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn index b1ae692d35..7647d38b17 100644 --- a/webrtc/modules/utility/BUILD.gn +++ b/webrtc/modules/utility/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -source_set("utility") { +rtc_source_set("utility") { sources = [ "include/audio_frame_operations.h", "include/file_player.h", @@ -34,7 +34,7 @@ source_set("utility") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_ios) { diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn index 0875ed8ea6..23b978bf8f 100644 --- a/webrtc/modules/video_capture/BUILD.gn +++ b/webrtc/modules/video_capture/BUILD.gn @@ -7,13 +7,12 @@ # be found in the AUTHORS file in the root of the source tree. import("../../build/webrtc.gni") -import("//testing/test.gni") # Note this target is missing an implementation for the video capture. # Targets must link with either 'video_capture' or # 'video_capture_internal_impl' depending on whether they want to # use the internal capturer. -source_set("video_capture_module") { +rtc_source_set("video_capture_module") { sources = [ "device_info_impl.cc", "device_info_impl.h", @@ -40,11 +39,11 @@ source_set("video_capture_module") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } -source_set("video_capture") { +rtc_source_set("video_capture") { sources = [ "external/device_info_external.cc", "external/video_capture_external.cc", @@ -61,7 +60,7 @@ source_set("video_capture") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } @@ -94,7 +93,7 @@ if (!build_with_chromium) { } } - source_set("video_capture_internal_impl") { + rtc_source_set("video_capture_internal_impl") { configs += [ ":video_capture_internal_impl_warnings_config" ] deps = [ @@ -186,12 +185,12 @@ if (!build_with_chromium) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } if (!is_android && rtc_include_tests) { - test("video_capture_tests") { + rtc_test("video_capture_tests") { sources = [ "test/video_capture_main_mac.mm", "test/video_capture_unittest.cc", @@ -234,7 +233,7 @@ if (!build_with_chromium) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index 8cd7570046..8b40b7e02c 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -source_set("video_coding") { +rtc_source_set("video_coding") { sources = [ "codec_database.cc", "codec_database.h", @@ -83,7 +83,7 @@ source_set("video_coding") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -98,7 +98,7 @@ source_set("video_coding") { ] } -source_set("video_coding_utility") { +rtc_source_set("video_coding_utility") { sources = [ "utility/frame_dropper.cc", "utility/frame_dropper.h", @@ -121,7 +121,7 @@ source_set("video_coding_utility") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -130,7 +130,7 @@ source_set("video_coding_utility") { ] } -source_set("webrtc_h264") { +rtc_source_set("webrtc_h264") { sources = [ "codecs/h264/h264.cc", "codecs/h264/include/h264.h", @@ -142,7 +142,7 @@ source_set("webrtc_h264") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } defines = [] @@ -175,7 +175,7 @@ source_set("webrtc_h264") { } if (is_ios) { - source_set("webrtc_h264_video_toolbox") { + rtc_source_set("webrtc_h264_video_toolbox") { sources = [ "codecs/h264/h264_video_toolbox_decoder.cc", "codecs/h264/h264_video_toolbox_decoder.h", @@ -204,7 +204,7 @@ if (is_ios) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (rtc_build_libyuv) { @@ -219,7 +219,7 @@ if (is_ios) { } } -source_set("webrtc_i420") { +rtc_source_set("webrtc_i420") { sources = [ "codecs/i420/i420.cc", "codecs/i420/include/i420.h", @@ -231,7 +231,7 @@ source_set("webrtc_i420") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -239,7 +239,7 @@ source_set("webrtc_i420") { ] } -source_set("webrtc_vp8") { +rtc_source_set("webrtc_vp8") { sources = [ "codecs/vp8/default_temporal_layers.cc", "codecs/vp8/default_temporal_layers.h", @@ -266,7 +266,7 @@ source_set("webrtc_vp8") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -280,7 +280,7 @@ source_set("webrtc_vp8") { } } -source_set("webrtc_vp9") { +rtc_source_set("webrtc_vp9") { sources = [ "codecs/vp9/include/vp9.h", "codecs/vp9/screenshare_layers.cc", @@ -297,7 +297,7 @@ source_set("webrtc_vp9") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -311,7 +311,7 @@ source_set("webrtc_vp9") { } if (rtc_include_tests) { - source_set("video_codecs_test_framework") { + rtc_source_set("video_codecs_test_framework") { testonly = true sources = [ "codecs/test/mock/mock_packet_manipulator.h", @@ -331,7 +331,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn index 1177d9b7f0..c297e29014 100644 --- a/webrtc/modules/video_processing/BUILD.gn +++ b/webrtc/modules/video_processing/BUILD.gn @@ -11,7 +11,7 @@ import("../../build/webrtc.gni") build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" -source_set("video_processing") { +rtc_source_set("video_processing") { sources = [ "frame_preprocessor.cc", "frame_preprocessor.h", @@ -54,12 +54,12 @@ source_set("video_processing") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } if (build_video_processing_sse2) { - source_set("video_processing_sse2") { + rtc_source_set("video_processing_sse2") { sources = [ "util/denoiser_filter_sse2.cc", "util/denoiser_filter_sse2.h", @@ -71,7 +71,7 @@ if (build_video_processing_sse2) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_posix) { @@ -81,13 +81,13 @@ if (build_video_processing_sse2) { } if (rtc_build_with_neon) { - source_set("video_processing_neon") { + rtc_source_set("video_processing_neon") { sources = [ "util/denoiser_filter_neon.cc", "util/denoiser_filter_neon.h", ] if (current_cpu != "arm64") { - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] cflags = [ "-mfpu=neon" ] } configs += [ "../..:common_config" ] diff --git a/webrtc/p2p/BUILD.gn b/webrtc/p2p/BUILD.gn index 5f0f5220b4..ac267794e8 100644 --- a/webrtc/p2p/BUILD.gn +++ b/webrtc/p2p/BUILD.gn @@ -18,7 +18,7 @@ config("rtc_p2p_inherited_config") { defines = [ "FEATURE_ENABLE_VOICEMAIL" ] } -source_set("rtc_p2p") { +rtc_source_set("rtc_p2p") { sources = [ "base/asyncstuntcpsocket.cc", "base/asyncstuntcpsocket.h", @@ -122,7 +122,7 @@ source_set("rtc_p2p") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } @@ -146,7 +146,7 @@ source_set("rtc_p2p") { } } -source_set("libstunprober") { +rtc_source_set("libstunprober") { sources = [ "stunprober/stunprober.cc", ] @@ -154,7 +154,7 @@ source_set("libstunprober") { if (!build_with_chromium && is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -165,8 +165,7 @@ source_set("libstunprober") { if (!build_with_chromium) { # Doesn't build within Chrome on Win. - - executable("stun_prober") { + rtc_executable("stun_prober") { sources = [ "stunprober/main.cc", ] @@ -175,7 +174,7 @@ if (!build_with_chromium) { if (!build_with_chromium && is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/pc/BUILD.gn b/webrtc/pc/BUILD.gn index 906d99575b..3b4611b3a8 100644 --- a/webrtc/pc/BUILD.gn +++ b/webrtc/pc/BUILD.gn @@ -7,7 +7,6 @@ # be found in the AUTHORS file in the root of the source tree. import("../build/webrtc.gni") -import("//testing/test.gni") group("pc") { deps = [ @@ -23,7 +22,7 @@ config("rtc_pc_config") { ] } -source_set("rtc_pc") { +rtc_source_set("rtc_pc") { defines = [] sources = [ "audiomonitor.cc", @@ -72,7 +71,7 @@ source_set("rtc_pc") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } @@ -86,7 +85,7 @@ if (rtc_include_tests) { } } - test("rtc_pc_unittests") { + rtc_test("rtc_pc_unittests") { testonly = true sources = [ @@ -109,7 +108,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_win) { diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn index 0f63127801..69ec091a79 100644 --- a/webrtc/sdk/BUILD.gn +++ b/webrtc/sdk/BUILD.gn @@ -18,7 +18,7 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) { ] } - source_set("rtc_sdk_common_objc") { + rtc_source_set("rtc_sdk_common_objc") { deps = [ "../base:rtc_base", ] @@ -69,7 +69,7 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) { } } - source_set("rtc_sdk_peerconnection_objc") { + rtc_source_set("rtc_sdk_peerconnection_objc") { sources = [ "objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h", "objc/Framework/Classes/RTCAVFoundationVideoSource.mm", @@ -195,7 +195,7 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) { if (is_clang) { # Suppress warnings from the Chromium Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } libs += [ "AVFoundation.framework" ] diff --git a/webrtc/stats/BUILD.gn b/webrtc/stats/BUILD.gn index d1c08bdd51..e1f5ea1b94 100644 --- a/webrtc/stats/BUILD.gn +++ b/webrtc/stats/BUILD.gn @@ -7,7 +7,6 @@ # be found in the AUTHORS file in the root of the source tree. import("../build/webrtc.gni") -import("//testing/test.gni") group("stats") { deps = [ @@ -16,7 +15,7 @@ group("stats") { } # GYP version: webrtc/stats/stats.gyp:rtc_stats -source_set("rtc_stats") { +rtc_source_set("rtc_stats") { cflags = [] sources = [ "rtcstats.cc", @@ -31,7 +30,7 @@ source_set("rtc_stats") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -41,7 +40,7 @@ source_set("rtc_stats") { if (rtc_include_tests) { # GYP version: webrtc/stats/stats.gyp:rtc_stats_unittests - test("rtc_stats_unittests") { + rtc_test("rtc_stats_unittests") { testonly = true sources = [ "rtcstats_unittest.cc", @@ -54,7 +53,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn index 8126f506bb..327c9af4b9 100644 --- a/webrtc/system_wrappers/BUILD.gn +++ b/webrtc/system_wrappers/BUILD.gn @@ -10,10 +10,9 @@ if (is_android) { import("//build/config/android/config.gni") import("//build/config/android/rules.gni") } -import("//testing/test.gni") import("../build/webrtc.gni") -source_set("system_wrappers") { +rtc_source_set("system_wrappers") { sources = [ "include/aligned_array.h", "include/aligned_malloc.h", @@ -135,13 +134,13 @@ source_set("system_wrappers") { if (is_win && is_clang) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps += [ "../base:rtc_base_approved" ] } -source_set("field_trial_default") { +rtc_source_set("field_trial_default") { sources = [ "include/field_trial_default.h", "source/field_trial_default.cc", @@ -151,7 +150,7 @@ source_set("field_trial_default") { public_configs = [ "..:common_inherited_config" ] } -source_set("metrics_default") { +rtc_source_set("metrics_default") { sources = [ "include/metrics_default.h", "source/metrics_default.cc", @@ -161,7 +160,7 @@ source_set("metrics_default") { public_configs = [ "..:common_inherited_config" ] } -source_set("system_wrappers_default") { +rtc_source_set("system_wrappers_default") { configs += [ "..:common_config" ] public_configs = [ "..:common_inherited_config" ] @@ -173,7 +172,7 @@ source_set("system_wrappers_default") { } if (is_android) { - source_set("cpu_features_android") { + rtc_source_set("cpu_features_android") { sources = [ "source/cpu_features_android.c", ] @@ -187,7 +186,7 @@ if (is_android) { } if (is_linux) { - source_set("cpu_features_linux") { + rtc_source_set("cpu_features_linux") { sources = [ "source/cpu_features_linux.c", ] @@ -198,7 +197,7 @@ if (is_linux) { } if (rtc_include_tests) { - test("system_wrappers_unittests") { + rtc_test("system_wrappers_unittests") { testonly = true sources = [ "source/aligned_array_unittest.cc", @@ -233,7 +232,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 993ff59267..4b3cb3d4c6 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -6,13 +6,13 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. +import("../build/webrtc.gni") import("//build/config/ui.gni") -import("//testing/test.gni") if (is_android) { import("//build/config/android/rules.gni") } -source_set("test") { +rtc_source_set("test") { testonly = true deps = [ @@ -50,7 +50,7 @@ config("channel_transport_warnings_config") { } } -source_set("channel_transport") { +rtc_source_set("channel_transport") { testonly = true sources = [ "channel_transport/channel_transport.cc", @@ -83,7 +83,7 @@ source_set("channel_transport") { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -93,7 +93,7 @@ source_set("channel_transport") { ] } -source_set("video_test_common") { +rtc_source_set("video_test_common") { testonly = true sources = [ "fake_texture_frame.cc", @@ -110,7 +110,7 @@ source_set("video_test_common") { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -118,7 +118,7 @@ source_set("video_test_common") { ] } -source_set("rtp_test_utils") { +rtc_source_set("rtp_test_utils") { testonly = true sources = [ "rtcp_packet_parser.cc", @@ -135,7 +135,7 @@ source_set("rtp_test_utils") { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -145,7 +145,7 @@ source_set("rtp_test_utils") { ] } -source_set("field_trial") { +rtc_source_set("field_trial") { testonly = true sources = [ "field_trial.cc", @@ -162,7 +162,7 @@ source_set("field_trial") { public_configs = [ "..:common_inherited_config" ] } -source_set("test_main") { +rtc_source_set("test_main") { testonly = true sources = [ "test_main.cc", @@ -180,7 +180,7 @@ source_set("test_main") { public_configs = [ "..:common_inherited_config" ] } -source_set("test_support") { +rtc_source_set("test_support") { testonly = true sources = [ @@ -214,7 +214,7 @@ source_set("test_support") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_ios) { @@ -235,7 +235,7 @@ source_set("test_support") { # Depend on this target when you want to have test_support but also the # main method needed for gtest to execute! -source_set("test_support_main") { +rtc_source_set("test_support_main") { testonly = true sources = [ @@ -263,7 +263,7 @@ source_set("test_support_main") { # This main will provide all the scaffolding and objective-c black magic # for you. All you need to do is to implement a function in the # run_threaded_main_mac.h file (ImplementThisToRunYourTest). -source_set("test_support_main_threaded_mac") { +rtc_source_set("test_support_main_threaded_mac") { testonly = true sources = [ @@ -301,7 +301,7 @@ if (is_ios) { } } -test("test_support_unittests") { +rtc_test("test_support_unittests") { deps = [] sources = [ "channel_transport/udp_socket_manager_unittest.cc", @@ -335,7 +335,7 @@ test("test_support_unittests") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } if (is_android) { @@ -358,7 +358,7 @@ test("test_support_unittests") { ] } -source_set("test_common") { +rtc_source_set("test_common") { testonly = true sources = [ "call_test.cc", @@ -412,7 +412,7 @@ source_set("test_common") { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -444,7 +444,7 @@ config("test_renderer_exported_config") { } } -source_set("test_renderer") { +rtc_source_set("test_renderer") { testonly = true libs = [] sources = [ @@ -498,7 +498,7 @@ source_set("test_renderer") { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/test/fuzzers/BUILD.gn b/webrtc/test/fuzzers/BUILD.gn index 6928062a7f..ee4275b6de 100644 --- a/webrtc/test/fuzzers/BUILD.gn +++ b/webrtc/test/fuzzers/BUILD.gn @@ -6,12 +6,12 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. +import("../../build/webrtc.gni") import("//build/config/features.gni") import("//build_overrides/webrtc.gni") import("//testing/libfuzzer/fuzzer_test.gni") -import("//testing/test.gni") -static_library("webrtc_fuzzer_main") { +rtc_static_library("webrtc_fuzzer_main") { public_configs = [ "../..:common_inherited_config" ] sources = [ "webrtc_fuzzer_main.cc", @@ -119,7 +119,7 @@ webrtc_fuzzer_test("congestion_controller_feedback_fuzzer") { ] } -source_set("audio_decoder_fuzzer") { +rtc_source_set("audio_decoder_fuzzer") { public_configs = [ "../..:common_inherited_config" ] sources = [ "audio_decoder_fuzzer.cc", diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn index c06a4b3136..2e5df7559f 100644 --- a/webrtc/tools/BUILD.gn +++ b/webrtc/tools/BUILD.gn @@ -6,11 +6,10 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. -import("//testing/test.gni") import("//third_party/protobuf/proto_library.gni") import("../build/webrtc.gni") -source_set("tools") { +rtc_source_set("tools") { deps = [ ":command_line_parser", ] @@ -24,7 +23,7 @@ source_set("tools") { } } -source_set("command_line_parser") { +rtc_source_set("command_line_parser") { sources = [ "simple_command_line_parser.cc", "simple_command_line_parser.h", @@ -36,7 +35,7 @@ source_set("command_line_parser") { public_configs = [ "..:common_inherited_config" ] } -source_set("video_quality_analysis") { +rtc_source_set("video_quality_analysis") { sources = [ "frame_analyzer/video_quality_analysis.cc", "frame_analyzer/video_quality_analysis.h", @@ -53,7 +52,7 @@ source_set("video_quality_analysis") { ] } -executable("frame_analyzer") { +rtc_executable("frame_analyzer") { sources = [ "frame_analyzer/frame_analyzer.cc", ] @@ -69,7 +68,7 @@ executable("frame_analyzer") { ] } -executable("psnr_ssim_analyzer") { +rtc_executable("psnr_ssim_analyzer") { sources = [ "psnr_ssim_analyzer/psnr_ssim_analyzer.cc", ] @@ -85,7 +84,7 @@ executable("psnr_ssim_analyzer") { ] } -executable("rgba_to_i420_converter") { +rtc_executable("rgba_to_i420_converter") { sources = [ "converter/converter.cc", "converter/converter.h", @@ -103,7 +102,7 @@ executable("rgba_to_i420_converter") { ] } -source_set("frame_editing_lib") { +rtc_source_set("frame_editing_lib") { sources = [ "frame_editing/frame_editing_lib.cc", "frame_editing/frame_editing_lib.h", @@ -118,7 +117,7 @@ source_set("frame_editing_lib") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -126,7 +125,7 @@ source_set("frame_editing_lib") { ] } -executable("frame_editor") { +rtc_executable("frame_editor") { sources = [ "frame_editing/frame_editing.cc", ] @@ -142,7 +141,7 @@ executable("frame_editor") { ] } -executable("force_mic_volume_max") { +rtc_executable("force_mic_volume_max") { sources = [ "force_mic_volume_max/force_mic_volume_max.cc", ] @@ -153,7 +152,7 @@ executable("force_mic_volume_max") { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -172,7 +171,7 @@ if (rtc_enable_protobuf) { proto_out_dir = "webrtc/tools/event_log_visualizer" } - source_set("event_log_visualizer_utils") { + rtc_source_set("event_log_visualizer_utils") { sources = [ "event_log_visualizer/analyzer.cc", "event_log_visualizer/analyzer.h", @@ -188,7 +187,7 @@ if (rtc_enable_protobuf) { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } defines = [ "ENABLE_RTC_EVENT_LOG" ] deps = [ @@ -209,7 +208,7 @@ if (rtc_enable_protobuf) { # Exclude tools depending on gflags since that's not available in Chromium. if (rtc_include_tests) { if (rtc_enable_protobuf) { - executable("event_log_visualizer") { + rtc_executable("event_log_visualizer") { testonly = true sources = [ "event_log_visualizer/main.cc", @@ -221,7 +220,7 @@ if (rtc_include_tests) { if (is_clang && !is_nacl) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } defines = [ "ENABLE_RTC_EVENT_LOG" ] @@ -233,7 +232,7 @@ if (rtc_include_tests) { } } - executable("activity_metric") { + rtc_executable("activity_metric") { testonly = true sources = [ "agc/activity_metric.cc", @@ -245,7 +244,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -258,7 +257,7 @@ if (rtc_include_tests) { ] } - executable("audio_e2e_harness") { + rtc_executable("audio_e2e_harness") { testonly = true sources = [ "e2e_quality/audio/audio_e2e_harness.cc", @@ -270,7 +269,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -298,7 +297,7 @@ if (rtc_include_tests) { } } - test("tools_unittests") { + rtc_test("tools_unittests") { testonly = true sources = [ @@ -316,7 +315,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn index 76c2ea64e9..1d3f55c4b9 100644 --- a/webrtc/video/BUILD.gn +++ b/webrtc/video/BUILD.gn @@ -7,9 +7,8 @@ # be found in the AUTHORS file in the root of the source tree. import("../build/webrtc.gni") -import("//testing/test.gni") -source_set("video") { +rtc_source_set("video") { sources = [ "call_stats.cc", "call_stats.h", @@ -55,7 +54,7 @@ source_set("video") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -80,7 +79,7 @@ source_set("video") { if (rtc_include_tests) { # TODO(pbos): Rename test suite. - source_set("video_tests") { + rtc_source_set("video_tests") { testonly = true sources = [ "call_stats_unittest.cc", @@ -108,7 +107,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } } diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn index ffa17ed266..02caffabad 100644 --- a/webrtc/voice_engine/BUILD.gn +++ b/webrtc/voice_engine/BUILD.gn @@ -7,9 +7,8 @@ # be found in the AUTHORS file in the root of the source tree. import("../build/webrtc.gni") -import("//testing/test.gni") -source_set("voice_engine") { +rtc_source_set("voice_engine") { sources = [ "channel.cc", "channel.h", @@ -85,7 +84,7 @@ source_set("voice_engine") { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } deps = [ @@ -108,7 +107,7 @@ source_set("voice_engine") { ] } -source_set("level_indicator") { +rtc_source_set("level_indicator") { sources = [ "level_indicator.cc", "level_indicator.h", @@ -125,7 +124,7 @@ source_set("level_indicator") { } if (rtc_include_tests) { - test("voice_engine_unittests") { + rtc_test("voice_engine_unittests") { deps = [ ":voice_engine", "//testing/gmock", @@ -172,12 +171,12 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } if (!is_ios) { - executable("voe_auto_test") { + rtc_executable("voe_auto_test") { testonly = true deps = [ @@ -266,7 +265,7 @@ if (rtc_include_tests) { if (is_clang) { # Suppress warnings from Chrome's Clang plugins. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. - configs -= [ "//build/config/clang:find_bad_constructs" ] + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } } }