| 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.
|
|
|