GN: Fix build by disabling compiler warning in base.

It seems like it is not possible to disabled the -Wall
warnings that are enabled in build/config/compiler/BUILD.gn
with -Wno-all.

According to the documentation at
https://code.google.com/p/chromium/wiki/GNCookbook
the proper way is to disable the chromium_code config instead.

System wrappers also needed some minor fixes for Android.

TBR=henrike@webrtc.org
BUG=3441
TEST=Passing our GN trybots.

Review URL: https://webrtc-codereview.appspot.com/18649004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6561 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index 62566a2..cbe10f9 100644
--- a/webrtc/base/BUILD.gn
+++ b/webrtc/base/BUILD.gn
@@ -435,12 +435,11 @@
     deps += [ "//third_party/jsoncpp" ]
   }  # !build_with_chromium
 
-  # TODO(henrike): issue 3307, make webrtc_base build without disabling
-  # these flags.
-  cflags += [
-    "-Wno-extra",
-    "-Wno-all",
-  ]
+  # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
+  # compiler settings.
+  configs -= [ "//build/config/compiler:chromium_code" ]
+  configs += [ "//build/config/compiler:no_chromium_code" ]
+  cflags += [ "-Wno-uninitialized" ]
   cflags_cc += [ "-Wno-non-virtual-dtor" ]
 
   if (use_openssl) {
diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn
index 4c6c605..e416513 100644
--- a/webrtc/system_wrappers/BUILD.gn
+++ b/webrtc/system_wrappers/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/config/android/config.gni")
 import("../build/webrtc.gni")
 
 config("system_wrappers_inherited_config") {
@@ -120,6 +121,7 @@
 
   defines = []
   libs = []
+  deps = []
 
   if (is_android) {
     sources += [
@@ -136,7 +138,7 @@
       "WEBRTC_CLOCK_TYPE_REALTIME",
     ]
 
-    deps = [ "cpu_features_android" ]
+    deps += [ ":cpu_features_android" ]
 
     libs += [ "log" ]
   }
@@ -184,7 +186,7 @@
     "source/spreadsortlib",
   ]
 
-  deps = [
+  deps += [
     "../base:webrtc_base",
   ]
 }