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

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: 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", 532 "-Wextra",
Nico 2014/11/03 18:58:42 I'd just remove this. -Wextra is a no-op in clang,
533 533
534 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, 534 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
535 # so we specify it explicitly. 535 # so we specify it explicitly.
536 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. 536 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
537 # http://code.google.com/p/chromium/issues/detail?id=90453 537 # http://code.google.com/p/chromium/issues/detail?id=90453
538 "-Wsign-compare", 538 "-Wsign-compare",
539 ] 539 ]
540 540
541 # In Chromium code, we define __STDC_foo_MACROS in order to get the 541 # In Chromium code, we define __STDC_foo_MACROS in order to get the
542 # C99 macros on Mac and Linux. 542 # 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 736 # which we no longer use. Check if it makes sense to remove
737 # this as well. http://crbug.com/316352 737 # this as well. http://crbug.com/316352
738 "-Wno-unneeded-internal-declaration", 738 "-Wno-unneeded-internal-declaration",
739 739
740 # TODO(thakis): Remove, http://crbug.com/263960 740 # TODO(thakis): Remove, http://crbug.com/263960
741 "-Wno-reserved-user-defined-literal", 741 "-Wno-reserved-user-defined-literal",
742 742
743 # TODO(hans): Clean this up. Or disable with finer granularity. 743 # TODO(hans): Clean this up. Or disable with finer granularity.
744 "-Wno-unused-local-typedef", 744 "-Wno-unused-local-typedef",
745 ] 745 ]
746 } else {
747 cflags += [
748 # This warns if a comparison is always true or always false due to
749 # the limited range of the data type, but do not warn for constant
750 # expressions.
751 # Unfortunately, 'char' is signed on some toolchains and unsigned on
752 # others, and there are downsides to forcing it to be one or the other.
753 # Forcing signed makes ARM builds less performant, and Windows builds
754 # fail if we force unsigned.
755 "-Wno-type-limits",
756 ]
746 } 757 }
747 if (gcc_version >= 48) { 758 if (gcc_version >= 48) {
748 cflags_cc += [ 759 cflags_cc += [
749 # See comment for -Wno-c++11-narrowing. 760 # See comment for -Wno-c++11-narrowing.
750 "-Wno-narrowing", 761 "-Wno-narrowing",
751 # TODO(thakis): Remove, http://crbug.com/263960 762 # TODO(thakis): Remove, http://crbug.com/263960
752 "-Wno-literal-suffix", 763 "-Wno-literal-suffix",
753 ] 764 ]
754 } 765 }
755 766
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 cflags += [ "-gsplit-dwarf" ] 963 cflags += [ "-gsplit-dwarf" ]
953 } 964 }
954 } 965 }
955 } 966 }
956 967
957 config("no_symbols") { 968 config("no_symbols") {
958 if (!is_win) { 969 if (!is_win) {
959 cflags = [ "-g0" ] 970 cflags = [ "-g0" ]
960 } 971 }
961 } 972 }
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