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

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

Issue 1551753002: Build third-party code with -Wall, build chromium_code with -Wextra on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig Created 4 years, 12 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/common.gypi ('k') | chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc » ('j') | 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 97eb6726ca36455f5b87284c80ecc8c85f8c875e..88dba49ae0ec4b68de8f2f8281a02e92b0074ab3 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -894,15 +894,14 @@ config("chromium_code") {
if (is_win) {
cflags = [ "/W4" ] # Warning level 4.
} else {
- cflags = [
- "-Wall",
+ cflags = [ "-Wall" ]
- # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
- # so we specify it explicitly.
- # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
- # http://code.google.com/p/chromium/issues/detail?id=90453
- "-Wsign-compare",
- ]
+ # TODO(thakis): Remove !is_nacl once
+ # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+ if (is_clang && !is_nacl) {
+ # Enable -Wextra when we control the compiler.
+ cflags += [ "-Wextra" ]
+ }
# In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux.
@@ -944,6 +943,10 @@ config("no_chromium_code") {
"_CRT_NONSTDC_NO_WARNINGS",
"_CRT_NONSTDC_NO_DEPRECATE",
]
+ } else if (is_clang && !is_nacl) {
+ # TODO(thakis): Remove !is_nacl once
+ # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+ cflags += [ "-Wall" ]
}
if (is_linux) {
« no previous file with comments | « build/common.gypi ('k') | chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698