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/webrtc@6966 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/BUILD.gn b/BUILD.gn
index 04618bf..68f05d1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -213,5 +213,11 @@
     "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/base/BUILD.gn b/base/BUILD.gn
index 68c8f45..fbf29e8 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -424,6 +424,12 @@
     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/common_video/BUILD.gn b/common_video/BUILD.gn
index 69915e3..d432543 100644
--- a/common_video/BUILD.gn
+++ b/common_video/BUILD.gn
@@ -34,6 +34,12 @@
 
   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/modules/audio_conference_mixer/BUILD.gn b/modules/audio_conference_mixer/BUILD.gn
index a27bb84..c27d184 100644
--- a/modules/audio_conference_mixer/BUILD.gn
+++ b/modules/audio_conference_mixer/BUILD.gn
@@ -33,6 +33,12 @@
 
   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/modules/bitrate_controller/BUILD.gn b/modules/bitrate_controller/BUILD.gn
index c3ac28c..d4d8f68 100644
--- a/modules/bitrate_controller/BUILD.gn
+++ b/modules/bitrate_controller/BUILD.gn
@@ -24,5 +24,11 @@
     ]
   }
 
+  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/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn
index 55853fb..5bc3885 100644
--- a/modules/desktop_capture/BUILD.gn
+++ b/modules/desktop_capture/BUILD.gn
@@ -107,6 +107,12 @@
 
   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/modules/media_file/BUILD.gn b/modules/media_file/BUILD.gn
index 971a6fa..4e0cac6 100644
--- a/modules/media_file/BUILD.gn
+++ b/modules/media_file/BUILD.gn
@@ -35,6 +35,12 @@
     ]
   }
 
+  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/modules/pacing/BUILD.gn b/modules/pacing/BUILD.gn
index d3eceb3..7c451d6 100644
--- a/modules/pacing/BUILD.gn
+++ b/modules/pacing/BUILD.gn
@@ -12,5 +12,11 @@
     "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/modules/remote_bitrate_estimator/BUILD.gn b/modules/remote_bitrate_estimator/BUILD.gn
index cc643da..36af77e 100644
--- a/modules/remote_bitrate_estimator/BUILD.gn
+++ b/modules/remote_bitrate_estimator/BUILD.gn
@@ -16,4 +16,10 @@
   ]
 
   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/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
index 09fa3ac..74af071 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -93,6 +93,12 @@
     "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/modules/utility/BUILD.gn b/modules/utility/BUILD.gn
index 8251204..9856d2d 100644
--- a/modules/utility/BUILD.gn
+++ b/modules/utility/BUILD.gn
@@ -30,6 +30,12 @@
     "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/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index cbd1293..49df400 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -64,6 +64,12 @@
     "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 @@
     "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 @@
     "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 @@
 #    "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/modules/video_processing/BUILD.gn b/modules/video_processing/BUILD.gn
index 59bde18..42ef94b 100644
--- a/modules/video_processing/BUILD.gn
+++ b/modules/video_processing/BUILD.gn
@@ -44,15 +44,25 @@
   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/system_wrappers/BUILD.gn b/system_wrappers/BUILD.gn
index e416513..5b51e6f 100644
--- a/system_wrappers/BUILD.gn
+++ b/system_wrappers/BUILD.gn
@@ -108,6 +108,12 @@
 
   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 @@
   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",
   ]