Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3036)

Unified Diff: build/config/compiler/BUILD.gn

Issue 387693002: Port r282246 to gn. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nope Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 114ce1be29e7a4e8ac218e0aa3c067f3b95c18fc..0eddb2ce95b07aa5719e095abefebdc4e3598123 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -451,6 +451,8 @@ config("runtime_library") {
# Toggles between higher and lower warnings for code that is (or isn't)
# part of Chromium.
+# TODO: -Werror and /WX should always be on, independent of chromium_code
+# http://crbug.com/393046
config("chromium_code") {
if (is_win) {
cflags = [
@@ -460,7 +462,6 @@ config("chromium_code") {
} else {
cflags = [
"-Wall",
- "-Werror",
# GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
# so we specify it explicitly.
@@ -468,6 +469,11 @@ config("chromium_code") {
# http://code.google.com/p/chromium/issues/detail?id=90453
"-Wsign-compare",
]
+ if (!is_linux) {
+ # TODO: Add this unconditionally once linux builds without warnings with
+ # clang in the gn build.
+ cflags += [ "-Werror" ]
+ }
# In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux.
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698