OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 Loading... | |
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 } |
OLD | NEW |