From 42ee5b54b59d766066bac540c3e8ddf7d49b649f Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Mon, 25 Aug 2014 14:15:35 +0000 Subject: [PATCH] GN: Disable Chromium clang plugins for standalone build. Now that WebRTC has rolled the chromium_revision past http://crrev.com/284372 in r6784, clang has become the default compiler. Since WebRTC standalone code doesn't yet compile the Chromium Clang plugins enabled, this CL disables them for the parts of the code that doesn't yet pass compilation with them enabled. The buildbots are using Goma which is not yet switched over to Clang by default. That's why they're not red yet. BUG=163 TEST=Passing compile locally on Linux using: gn gen out/Debug --args="build_with_chromium=false is_debug=true" && ninja -C out/Debug gn gen out/Release --args="build_with_chromium=false is_debug=false" && ninja -C out/Release gn gen out/Default --args="build_with_chromium=false os=\"android\" cpu_arch=\"arm\" arm_version=7" && ninja -C out/Default R=brettw@chromium.org Review URL: https://webrtc-codereview.appspot.com/16279004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6966 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/BUILD.gn | 6 +++++ webrtc/base/BUILD.gn | 6 +++++ webrtc/common_video/BUILD.gn | 6 +++++ .../modules/audio_conference_mixer/BUILD.gn | 6 +++++ webrtc/modules/bitrate_controller/BUILD.gn | 6 +++++ webrtc/modules/desktop_capture/BUILD.gn | 6 +++++ webrtc/modules/media_file/BUILD.gn | 6 +++++ webrtc/modules/pacing/BUILD.gn | 6 +++++ .../modules/remote_bitrate_estimator/BUILD.gn | 6 +++++ webrtc/modules/rtp_rtcp/BUILD.gn | 6 +++++ webrtc/modules/utility/BUILD.gn | 6 +++++ webrtc/modules/video_coding/BUILD.gn | 25 +++++++++++++++++++ webrtc/modules/video_processing/BUILD.gn | 16 +++++++++--- webrtc/system_wrappers/BUILD.gn | 13 ++++++++++ 14 files changed, 117 insertions(+), 3 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 04618bfb6c..68f05d15b7 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -213,5 +213,11 @@ source_set("webrtc_common") { "config.cc", ] + 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" ] + } + configs += [ ":common_inherited_config"] } diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 68c8f453ee..fbf29e82b6 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -424,6 +424,12 @@ static_library("webrtc_base") { deps += [ "//third_party/jsoncpp" ] } # !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" ] + } + # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default # compiler settings. configs -= [ "//build/config/compiler:chromium_code" ] diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn index 69915e34ca..d4325432b0 100644 --- a/webrtc/common_video/BUILD.gn +++ b/webrtc/common_video/BUILD.gn @@ -34,6 +34,12 @@ source_set("common_video") { direct_dependent_configs = [ ":common_video_config" ] + 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" ] + } + deps = [ "../system_wrappers" ] if (build_libyuv) { diff --git a/webrtc/modules/audio_conference_mixer/BUILD.gn b/webrtc/modules/audio_conference_mixer/BUILD.gn index a27bb84c64..c27d184635 100644 --- a/webrtc/modules/audio_conference_mixer/BUILD.gn +++ b/webrtc/modules/audio_conference_mixer/BUILD.gn @@ -33,6 +33,12 @@ source_set("audio_conference_mixer") { direct_dependent_configs = [ ":internal_config" ] + 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" ] + } + deps = [ "../../system_wrappers", "../audio_processing", diff --git a/webrtc/modules/bitrate_controller/BUILD.gn b/webrtc/modules/bitrate_controller/BUILD.gn index c3ac28ce42..d4d8f68208 100644 --- a/webrtc/modules/bitrate_controller/BUILD.gn +++ b/webrtc/modules/bitrate_controller/BUILD.gn @@ -24,5 +24,11 @@ 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" ] + } + deps = [ "../../system_wrappers" ] } diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn index 55853fb099..5bc38853d3 100644 --- a/webrtc/modules/desktop_capture/BUILD.gn +++ b/webrtc/modules/desktop_capture/BUILD.gn @@ -107,6 +107,12 @@ source_set("desktop_capture") { configs += [ "../../:common_inherited_config"] + 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" ] + } + deps = ["../../system_wrappers"] if (use_desktop_capture_differ_sse2) { diff --git a/webrtc/modules/media_file/BUILD.gn b/webrtc/modules/media_file/BUILD.gn index 971a6fa29a..4e0cac6b5b 100644 --- a/webrtc/modules/media_file/BUILD.gn +++ b/webrtc/modules/media_file/BUILD.gn @@ -35,6 +35,12 @@ 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" ] + } + direct_dependent_configs = [ ":internal_config" ] deps = [ "../../system_wrappers" ] diff --git a/webrtc/modules/pacing/BUILD.gn b/webrtc/modules/pacing/BUILD.gn index d3eceb35bf..7c451d650b 100644 --- a/webrtc/modules/pacing/BUILD.gn +++ b/webrtc/modules/pacing/BUILD.gn @@ -12,5 +12,11 @@ source_set("pacing") { "paced_sender.cc", ] + 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" ] + } + deps = [ "../../system_wrappers" ] } diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn index cc643dad5b..36af77ed8d 100644 --- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn +++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn @@ -16,4 +16,10 @@ source_set("remote_bitrate_estimator") { ] configs += [ "../../:common_inherited_config"] + + 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" ] + } } diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index 09fa3aca39..74af071a5e 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -93,6 +93,12 @@ source_set("rtp_rtcp") { "source/mock/mock_rtp_payload_strategy.h", ] + 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" ] + } + deps = [ "../../system_wrappers", "../pacing", diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn index 825120460c..9856d2da9f 100644 --- a/webrtc/modules/utility/BUILD.gn +++ b/webrtc/modules/utility/BUILD.gn @@ -30,6 +30,12 @@ source_set("utility") { "source/rtp_dump_impl.h", ] + 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" ] + } + deps = [ "../../common_audio", "../../system_wrappers", diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index cbd129363a..49df4009fb 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -64,6 +64,12 @@ source_set("video_coding") { "main/source/video_sender.cc", ] + 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" ] + } + deps = [ ":video_coding_utility", ":webrtc_i420", @@ -79,6 +85,12 @@ source_set("video_coding_utility") { "utility/frame_dropper.cc", ] + 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" ] + } + deps = [ "../../system_wrappers" ] } @@ -88,6 +100,12 @@ source_set("webrtc_i420") { "codecs/i420/main/interface/i420.h", ] + 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" ] + } + deps = [ "../../system_wrappers" ] } @@ -107,6 +125,13 @@ source_set("webrtc_vp8") { # "codecs/vp8/vp8_impl.cc", # "codecs/vp8/vp8_impl.h", ] + + 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" ] + } + deps = [ ":video_coding_utility", "../../common_video", diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn index 59bde18767..42ef94bfa9 100644 --- a/webrtc/modules/video_processing/BUILD.gn +++ b/webrtc/modules/video_processing/BUILD.gn @@ -44,15 +44,25 @@ source_set("video_processing") { if (build_video_processing_sse2) { deps += [ ":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" ] + } } if (build_video_processing_sse2) { source_set("video_processing_sse2") { sources = [ "main/source/content_analysis_sse2.cc" ] - configs += [ - "../..:common_inherited_config", - ] + configs += [ "../..:common_inherited_config" ] + + 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" ] + } if (is_posix) { cflags = [ "-msse2" ] diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn index e416513326..5b51e6f111 100644 --- a/webrtc/system_wrappers/BUILD.gn +++ b/webrtc/system_wrappers/BUILD.gn @@ -108,6 +108,12 @@ static_library("system_wrappers") { configs += [ "..:common_config" ] + 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" ] + } + direct_dependent_configs = [ "..:common_inherited_config", ":system_wrappers_inherited_config", @@ -195,6 +201,13 @@ source_set("field_trial_default") { sources = [ "source/field_trial_default.cc", ] + + 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" ] + } + deps = [ ":system_wrappers", ]