| Index: build/config/compiler/BUILD.gn
|
| diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
| index c4d61e2281a7662b4a3ca17b8fe92dac7d15469b..8a9cb9f5c6d005f53402ad1b2977ab94c95d6fa4 100644
|
| --- a/build/config/compiler/BUILD.gn
|
| +++ b/build/config/compiler/BUILD.gn
|
| @@ -4,8 +4,10 @@
|
|
|
| import("//build/config/android/config.gni")
|
| import("//build/config/chrome_build.gni")
|
| +import("//build/config/chromecast_build.gni")
|
| import("//build/config/compiler/compiler.gni")
|
| import("//build/config/nacl/config.gni")
|
| +import("//build/config/sanitizers/sanitizers.gni")
|
| import("//build/toolchain/cc_wrapper.gni")
|
| import("//build/toolchain/toolchain.gni")
|
| import("//build_overrides/build.gni")
|
| @@ -1056,6 +1058,15 @@ config("chromium_code") {
|
| cflags = [ "-Wall" ]
|
| if (treat_warnings_as_errors) {
|
| cflags += [ "-Werror" ]
|
| +
|
| + # The compiler driver can sometimes (rarely) emit warnings before calling
|
| + # the actual linker. Make sure these warnings are treated as errors as
|
| + # well.
|
| + # TODO(thakis): Enable this in use_custom_libcxx (asan) builds.
|
| + # TODO(thakis): Enable this in chromecast builds.
|
| + if (!use_custom_libcxx && !is_chromecast) {
|
| + ldflags = [ "-Werror" ]
|
| + }
|
| }
|
| if (is_clang) {
|
| # Enable -Wextra for chromium_code when we control the compiler.
|
| @@ -1112,6 +1123,12 @@ config("no_chromium_code") {
|
| # code. crbug.com/589724
|
| if (treat_warnings_as_errors && is_clang) {
|
| cflags += [ "-Werror" ]
|
| +
|
| + # TODO(thakis): Enable this in use_custom_libcxx (asan) builds.
|
| + # TODO(thakis): Enable this in chromecast builds.
|
| + if (!use_custom_libcxx && !is_chromecast) {
|
| + ldflags = [ "-Werror" ]
|
| + }
|
| }
|
| if (is_clang && !is_nacl) {
|
| # TODO(thakis): Remove !is_nacl once
|
|
|