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 (current_cpu == "arm") { | 6 if (current_cpu == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
10 import("//build/config/mips.gni") | 10 import("//build/config/mips.gni") |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 | 702 |
703 # Warnings --------------------------------------------------------------------- | 703 # Warnings --------------------------------------------------------------------- |
704 # | 704 # |
705 # This is where we disable various warnings that we've decided aren't | 705 # This is where we disable various warnings that we've decided aren't |
706 # worthwhile, and enable special warnings. | 706 # worthwhile, and enable special warnings. |
707 | 707 |
708 config("default_warnings") { | 708 config("default_warnings") { |
709 if (is_win) { | 709 if (is_win) { |
710 cflags = [ | 710 cflags = [ |
711 "/WX", # Treat warnings as errors. | 711 "/WX", # Treat warnings as errors. |
| 712 |
712 # Warnings permanently disabled: | 713 # Warnings permanently disabled: |
713 | 714 |
714 # TODO(GYP) The GYP build doesn't have this globally enabled but disabled | 715 # TODO(GYP) The GYP build doesn't have this globally enabled but disabled |
715 # for a bunch of individual targets. Re-enable this globally when those | 716 # for a bunch of individual targets. Re-enable this globally when those |
716 # targets are fixed. | 717 # targets are fixed. |
717 "/wd4018", # Comparing signed and unsigned values. | 718 "/wd4018", # Comparing signed and unsigned values. |
718 | 719 |
719 # C4127: conditional expression is constant | 720 # C4127: conditional expression is constant |
720 # This warning can in theory catch dead code and other problems, but | 721 # This warning can in theory catch dead code and other problems, but |
721 # triggers in far too many desirable cases where the conditional | 722 # triggers in far too many desirable cases where the conditional |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 | 757 |
757 # C4611: interaction between 'function' and C++ object destruction is | 758 # C4611: interaction between 'function' and C++ object destruction is |
758 # non-portable | 759 # non-portable |
759 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN | 760 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN |
760 # suggests using exceptions instead of setjmp/longjmp for C++, but | 761 # suggests using exceptions instead of setjmp/longjmp for C++, but |
761 # Chromium code compiles without exception support. We therefore have to | 762 # Chromium code compiles without exception support. We therefore have to |
762 # use setjmp/longjmp for e.g. JPEG decode error handling, which means we | 763 # use setjmp/longjmp for e.g. JPEG decode error handling, which means we |
763 # have to turn off this warning (and be careful about how object | 764 # have to turn off this warning (and be careful about how object |
764 # destruction happens in such cases). | 765 # destruction happens in such cases). |
765 "/wd4611", | 766 "/wd4611", |
| 767 |
766 # Warnings to evaluate and possibly fix/reenable later: | 768 # Warnings to evaluate and possibly fix/reenable later: |
767 | 769 |
768 "/wd4100", # Unreferenced formal function parameter. | 770 "/wd4100", # Unreferenced formal function parameter. |
769 "/wd4121", # Alignment of a member was sensitive to packing. | 771 "/wd4121", # Alignment of a member was sensitive to packing. |
770 "/wd4244", # Conversion: possible loss of data. | 772 "/wd4244", # Conversion: possible loss of data. |
771 "/wd4481", # Nonstandard extension: override specifier. | 773 "/wd4481", # Nonstandard extension: override specifier. |
772 "/wd4505", # Unreferenced local function has been removed. | 774 "/wd4505", # Unreferenced local function has been removed. |
773 "/wd4510", # Default constructor could not be generated. | 775 "/wd4510", # Default constructor could not be generated. |
774 "/wd4512", # Assignment operator could not be generated. | 776 "/wd4512", # Assignment operator could not be generated. |
775 "/wd4610", # Class can never be instantiated, constructor required. | 777 "/wd4610", # Class can never be instantiated, constructor required. |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 cflags += [ "-gsplit-dwarf" ] | 1083 cflags += [ "-gsplit-dwarf" ] |
1082 } | 1084 } |
1083 } | 1085 } |
1084 } | 1086 } |
1085 | 1087 |
1086 config("no_symbols") { | 1088 config("no_symbols") { |
1087 if (!is_win) { | 1089 if (!is_win) { |
1088 cflags = [ "-g0" ] | 1090 cflags = [ "-g0" ] |
1089 } | 1091 } |
1090 } | 1092 } |
OLD | NEW |