| Index: build/config/compiler/BUILD.gn
|
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
| index b04d6dfe35279fd527035de16bc5e1552b7cd0ea..f5eb6a6799082cd1c75a39bf75fe7a68c3a853ea 100644
|
| --- a/build/config/compiler/BUILD.gn
|
| +++ b/build/config/compiler/BUILD.gn
|
| @@ -472,8 +472,6 @@ config("runtime_library") {
|
| # Toggles between higher and lower warnings for code that is (or isn't)
|
| # part of Chromium.
|
|
|
| -# TODO: -Werror should always be on, independent of chromium_code
|
| -# http://crbug.com/393046
|
| config("chromium_code") {
|
| if (is_win) {
|
| cflags = [
|
| @@ -482,6 +480,7 @@ config("chromium_code") {
|
| } else {
|
| cflags = [
|
| "-Wall",
|
| + "-Wextra",
|
|
|
| # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
|
| # so we specify it explicitly.
|
| @@ -489,11 +488,6 @@ 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.
|
| @@ -501,12 +495,6 @@ config("chromium_code") {
|
| "__STDC_CONSTANT_MACROS",
|
| "__STDC_FORMAT_MACROS",
|
| ]
|
| -
|
| - # TODO(brettw) this should also be enabled on Linux but some files
|
| - # currently fail.
|
| - if (is_mac) {
|
| - cflags += [ "-Wextra" ]
|
| - }
|
| }
|
| }
|
| config("no_chromium_code") {
|
| @@ -659,6 +647,7 @@ config("default_warnings") {
|
| cflags = [
|
| # Enables.
|
| "-Wendif-labels", # Weird old-style text after an #endif.
|
| + "-Werror", # Warnings as errors.
|
|
|
| # Disables.
|
| "-Wno-missing-field-initializers", # "struct foo f = {0};"
|
|
|