Commit 06b3a456 authored by thakis@chromium.org's avatar thakis@chromium.org

Port r282246 to gn.

Temporarily disable -Werror on linux, since the gn build isn't yet
warning-free with clang. Since gn doesn't use -Werror for all targets yet
anyways (http://crbug.com/393046) that seems acceptable.

BUG=360311,393046
R=brettw@chromium.org

Review URL: https://codereview.chromium.org/387693002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284372 0039d316-1c4b-4281-b951-d872f2087c98
parent 68ad6f8c
......@@ -31,7 +31,7 @@ declare_args() {
# Set to true when compiling with the Clang compiler. Typically this is used
# to configure warnings.
is_clang = (os == "mac" || os == "ios")
is_clang = (os == "mac" || os == "ios" || os == "linux")
# Forces a 64-bit build on Windows. Does nothing on other platforms. Normally
# we build 32-bit on Windows regardless of the current host OS bit depth.
......
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment