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

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

Issue 2088563002: Enable Wextra and Wno-unused-parameters in default cflags (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | services/prediction/dictionary_service.h » ('j') | 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 if (current_cpu == "arm") { 7 if (current_cpu == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 "-Wno-char-subscripts", 816 "-Wno-char-subscripts",
817 817
818 # Warns on switches on enums that cover all enum values but 818 # Warns on switches on enums that cover all enum values but
819 # also contain a default: branch. Chrome is full of that. 819 # also contain a default: branch. Chrome is full of that.
820 "-Wno-covered-switch-default", 820 "-Wno-covered-switch-default",
821 821
822 # Clang considers the `register` keyword as deprecated, but e.g. 822 # Clang considers the `register` keyword as deprecated, but e.g.
823 # code generated by flex (used in angle) contains that keyword. 823 # code generated by flex (used in angle) contains that keyword.
824 # http://crbug.com/255186 824 # http://crbug.com/255186
825 "-Wno-deprecated-register", 825 "-Wno-deprecated-register",
826
827 "-Wno-unused-parameter",
826 ] 828 ]
827 829
828 # NaCl's Clang compiler and Chrome's hermetic Clang compiler will almost 830 # NaCl's Clang compiler and Chrome's hermetic Clang compiler will almost
829 # always have different versions. Certain flags may not be recognized by 831 # always have different versions. Certain flags may not be recognized by
830 # one version or the other. 832 # one version or the other.
831 if (!is_nacl) { 833 if (!is_nacl) {
832 # Flags NaCl (Clang 3.7) does not recognize. 834 # Flags NaCl (Clang 3.7) does not recognize.
833 default_warning_flags += [ 835 default_warning_flags += [
834 # TODO(smklein): Enable this, crbug.com/507717 836 # TODO(smklein): Enable this, crbug.com/507717
835 "-Wno-shift-negative-value", 837 "-Wno-shift-negative-value",
836 ] 838 ]
837 } 839 }
838 } 840 }
839 841
840 # chromium_code --------------------------------------------------------------- 842 # chromium_code ---------------------------------------------------------------
841 # 843 #
842 # Toggles between higher and lower warnings for code that is (or isn't) 844 # Toggles between higher and lower warnings for code that is (or isn't)
843 # part of Chromium. 845 # part of Chromium.
844 846
845 config("chromium_code") { 847 config("chromium_code") {
846 cflags = [ 848 cflags = [
847 "-Wall", 849 "-Wall",
848 850 "-Wextra",
849 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
850 # so we specify it explicitly.
851 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
852 # http://code.google.com/p/chromium/issues/detail?id=90453
853 "-Wsign-compare",
854 ] 851 ]
855 852
856 # In Chromium code, we define __STDC_foo_MACROS in order to get the 853 # In Chromium code, we define __STDC_foo_MACROS in order to get the
857 # C99 macros on Mac and Linux. 854 # C99 macros on Mac and Linux.
858 defines = [ 855 defines = [
859 "__STDC_CONSTANT_MACROS", 856 "__STDC_CONSTANT_MACROS",
860 "__STDC_FORMAT_MACROS", 857 "__STDC_FORMAT_MACROS",
861 ] 858 ]
862 859
863 if (!is_debug && !using_sanitizer && 860 if (!is_debug && !using_sanitizer &&
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 if (symbol_level == 0) { 1114 if (symbol_level == 0) {
1118 configs = [ ":no_symbols" ] 1115 configs = [ ":no_symbols" ]
1119 } else if (symbol_level == 1) { 1116 } else if (symbol_level == 1) {
1120 configs = [ ":minimal_symbols" ] 1117 configs = [ ":minimal_symbols" ]
1121 } else if (symbol_level == 2) { 1118 } else if (symbol_level == 2) {
1122 configs = [ ":symbols" ] 1119 configs = [ ":symbols" ]
1123 } else { 1120 } else {
1124 assert(false) 1121 assert(false)
1125 } 1122 }
1126 } 1123 }
OLDNEW
« no previous file with comments | « no previous file | services/prediction/dictionary_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698