From 62711f822711f9994e70d6ba93cb5eeac33b00e2 Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Sun, 29 Jun 2014 13:37:08 +0000 Subject: [PATCH] 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 --- webrtc/base/BUILD.gn | 11 +++++------ webrtc/system_wrappers/BUILD.gn | 6 ++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 62566a260..cbe10f951 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -435,12 +435,11 @@ static_library("webrtc_base") { 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 4c6c6051c..e41651332 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 @@ static_library("system_wrappers") { defines = [] libs = [] + deps = [] if (is_android) { sources += [ @@ -136,7 +138,7 @@ static_library("system_wrappers") { "WEBRTC_CLOCK_TYPE_REALTIME", ] - deps = [ "cpu_features_android" ] + deps += [ ":cpu_features_android" ] libs += [ "log" ] } @@ -184,7 +186,7 @@ static_library("system_wrappers") { "source/spreadsortlib", ] - deps = [ + deps += [ "../base:webrtc_base", ] }