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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 1552863004: Linux/CrOS/Cast/Android (and Mac with gn): Build chromium_code with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/nacl/config.gni") 8 import("//build/config/nacl/config.gni")
9 import("//build/toolchain/ccache.gni") 9 import("//build/toolchain/ccache.gni")
10 10
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 887
888 # chromium_code --------------------------------------------------------------- 888 # chromium_code ---------------------------------------------------------------
889 # 889 #
890 # Toggles between higher and lower warnings for code that is (or isn't) 890 # Toggles between higher and lower warnings for code that is (or isn't)
891 # part of Chromium. 891 # part of Chromium.
892 892
893 config("chromium_code") { 893 config("chromium_code") {
894 if (is_win) { 894 if (is_win) {
895 cflags = [ "/W4" ] # Warning level 4. 895 cflags = [ "/W4" ] # Warning level 4.
896 } else { 896 } else {
897 cflags = [ 897 cflags = [ "-Wall" ]
898 "-Wall", 898 if (is_clang) {
899 899 # Enable -Wextra for chromium_code when we control the compiler.
900 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, 900 cflags += [ "-Wextra" ]
901 # so we specify it explicitly. 901 }
902 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
903 # http://code.google.com/p/chromium/issues/detail?id=90453
904 "-Wsign-compare",
905 ]
906 902
907 # In Chromium code, we define __STDC_foo_MACROS in order to get the 903 # In Chromium code, we define __STDC_foo_MACROS in order to get the
908 # C99 macros on Mac and Linux. 904 # C99 macros on Mac and Linux.
909 defines = [ 905 defines = [
910 "__STDC_CONSTANT_MACROS", 906 "__STDC_CONSTANT_MACROS",
911 "__STDC_FORMAT_MACROS", 907 "__STDC_FORMAT_MACROS",
912 ] 908 ]
913 909
914 if (!is_debug && !using_sanitizer && 910 if (!is_debug && !using_sanitizer &&
915 (!is_linux || !is_clang || is_official_build)) { 911 (!is_linux || !is_clang || is_official_build)) {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 if (symbol_level == 0) { 1303 if (symbol_level == 0) {
1308 configs = [ ":no_symbols" ] 1304 configs = [ ":no_symbols" ]
1309 } else if (symbol_level == 1) { 1305 } else if (symbol_level == 1) {
1310 configs = [ ":minimal_symbols" ] 1306 configs = [ ":minimal_symbols" ]
1311 } else if (symbol_level == 2) { 1307 } else if (symbol_level == 2) {
1312 configs = [ ":symbols" ] 1308 configs = [ ":symbols" ]
1313 } else { 1309 } else {
1314 assert(false) 1310 assert(false)
1315 } 1311 }
1316 } 1312 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698