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

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

Issue 692313002: Disable -Wextra for all toolchains. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch to disabling -Wextra altogether Created 6 years, 1 month 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 | 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 if (cpu_arch == "arm") { 6 if (cpu_arch == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 if (is_posix) { 9 if (is_posix) {
10 import("//build/config/gcc/gcc_version.gni") 10 import("//build/config/gcc/gcc_version.gni")
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 # part of Chromium. 522 # part of Chromium.
523 523
524 config("chromium_code") { 524 config("chromium_code") {
525 if (is_win) { 525 if (is_win) {
526 cflags = [ 526 cflags = [
527 "/W4", # Warning level 4. 527 "/W4", # Warning level 4.
528 ] 528 ]
529 } else { 529 } else {
530 cflags = [ 530 cflags = [
531 "-Wall", 531 "-Wall",
532 "-Wextra",
533 532
534 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, 533 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
535 # so we specify it explicitly. 534 # so we specify it explicitly.
536 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. 535 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
537 # http://code.google.com/p/chromium/issues/detail?id=90453 536 # http://code.google.com/p/chromium/issues/detail?id=90453
538 "-Wsign-compare", 537 "-Wsign-compare",
539 ] 538 ]
540 539
541 # In Chromium code, we define __STDC_foo_MACROS in order to get the 540 # In Chromium code, we define __STDC_foo_MACROS in order to get the
542 # C99 macros on Mac and Linux. 541 # C99 macros on Mac and Linux.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 # which we no longer use. Check if it makes sense to remove 735 # which we no longer use. Check if it makes sense to remove
737 # this as well. http://crbug.com/316352 736 # this as well. http://crbug.com/316352
738 "-Wno-unneeded-internal-declaration", 737 "-Wno-unneeded-internal-declaration",
739 738
740 # TODO(thakis): Remove, http://crbug.com/263960 739 # TODO(thakis): Remove, http://crbug.com/263960
741 "-Wno-reserved-user-defined-literal", 740 "-Wno-reserved-user-defined-literal",
742 741
743 # TODO(hans): Clean this up. Or disable with finer granularity. 742 # TODO(hans): Clean this up. Or disable with finer granularity.
744 "-Wno-unused-local-typedef", 743 "-Wno-unused-local-typedef",
745 ] 744 ]
745 } else {
746 cflags += [
747 # This warns if a comparison is always true or always false due to
748 # the limited range of the data type, but do not warn for constant
749 # expressions.
750 # Unfortunately, 'char' is signed on some toolchains and unsigned on
751 # others, and there are downsides to forcing it to be one or the other.
752 # Forcing signed makes ARM builds less performant, and Windows builds
753 # fail if we force unsigned.
754 "-Wno-type-limits",
Nico 2014/11/03 20:30:10 If you want to keep this, I'd add it to the gyp bu
Chris Masone 2014/11/03 20:38:50 Done.
755 ]
746 } 756 }
747 if (gcc_version >= 48) { 757 if (gcc_version >= 48) {
748 cflags_cc += [ 758 cflags_cc += [
749 # See comment for -Wno-c++11-narrowing. 759 # See comment for -Wno-c++11-narrowing.
750 "-Wno-narrowing", 760 "-Wno-narrowing",
751 # TODO(thakis): Remove, http://crbug.com/263960 761 # TODO(thakis): Remove, http://crbug.com/263960
752 "-Wno-literal-suffix", 762 "-Wno-literal-suffix",
753 ] 763 ]
754 } 764 }
755 765
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 cflags += [ "-gsplit-dwarf" ] 962 cflags += [ "-gsplit-dwarf" ]
953 } 963 }
954 } 964 }
955 } 965 }
956 966
957 config("no_symbols") { 967 config("no_symbols") {
958 if (!is_win) { 968 if (!is_win) {
959 cflags = [ "-g0" ] 969 cflags = [ "-g0" ]
960 } 970 }
961 } 971 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698