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 30 matching lines...) Expand all Loading... |
41 # address space, and it doesn't support cross-compiling). | 41 # address space, and it doesn't support cross-compiling). |
42 use_gold = is_linux && current_cpu == "x64" | 42 use_gold = is_linux && current_cpu == "x64" |
43 | 43 |
44 # use_debug_fission: whether to use split DWARF debug info | 44 # use_debug_fission: whether to use split DWARF debug info |
45 # files. This can reduce link time significantly, but is incompatible | 45 # files. This can reduce link time significantly, but is incompatible |
46 # with some utilities such as icecc and ccache. Requires gold and | 46 # with some utilities such as icecc and ccache. Requires gold and |
47 # gcc >= 4.8 or clang. | 47 # gcc >= 4.8 or clang. |
48 # http://gcc.gnu.org/wiki/DebugFission | 48 # http://gcc.gnu.org/wiki/DebugFission |
49 use_debug_fission = | 49 use_debug_fission = |
50 !is_win && use_gold && linux_use_bundled_binutils && !use_ccache | 50 !is_win && use_gold && linux_use_bundled_binutils && !use_ccache |
| 51 |
| 52 if (is_win) { |
| 53 # Whether the VS xtree header has been patched to disable warning 4702. If |
| 54 # it has, then we don't need to disable 4702 (unreachable code warning). |
| 55 # The patch is preapplied to the internal toolchain and hence all bots. |
| 56 msvs_xtree_patched = false |
| 57 } |
51 } | 58 } |
52 | 59 |
53 # default_include_dirs --------------------------------------------------------- | 60 # default_include_dirs --------------------------------------------------------- |
54 # | 61 # |
55 # This is a separate config so that third_party code (which would not use the | 62 # This is a separate config so that third_party code (which would not use the |
56 # source root and might have conflicting versions of some headers) can remove | 63 # source root and might have conflicting versions of some headers) can remove |
57 # this and specify their own include paths. | 64 # this and specify their own include paths. |
58 config("default_include_dirs") { | 65 config("default_include_dirs") { |
59 include_dirs = [ | 66 include_dirs = [ |
60 "//", | 67 "//", |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 "/wd4100", # Unreferenced formal function parameter. | 775 "/wd4100", # Unreferenced formal function parameter. |
769 "/wd4121", # Alignment of a member was sensitive to packing. | 776 "/wd4121", # Alignment of a member was sensitive to packing. |
770 "/wd4244", # Conversion: possible loss of data. | 777 "/wd4244", # Conversion: possible loss of data. |
771 "/wd4481", # Nonstandard extension: override specifier. | 778 "/wd4481", # Nonstandard extension: override specifier. |
772 "/wd4505", # Unreferenced local function has been removed. | 779 "/wd4505", # Unreferenced local function has been removed. |
773 "/wd4510", # Default constructor could not be generated. | 780 "/wd4510", # Default constructor could not be generated. |
774 "/wd4512", # Assignment operator could not be generated. | 781 "/wd4512", # Assignment operator could not be generated. |
775 "/wd4610", # Class can never be instantiated, constructor required. | 782 "/wd4610", # Class can never be instantiated, constructor required. |
776 "/wd4996", # Deprecated function warning. | 783 "/wd4996", # Deprecated function warning. |
777 ] | 784 ] |
| 785 |
| 786 # VS xtree header file needs to be patched or 4702 (unreachable code |
| 787 # warning) is reported if _HAS_EXCEPTIONS=0. Disable the warning if xtree is |
| 788 # not patched. |
| 789 if (!msvs_xtree_patched && |
| 790 exec_script("../../win_is_xtree_patched.py", [], "value") == 0) { |
| 791 cflags += [ "/wd4702" ] # Unreachable code. |
| 792 } |
778 } else { | 793 } else { |
779 # Common GCC warning setup. | 794 # Common GCC warning setup. |
780 cflags = [ | 795 cflags = [ |
781 # Enables. | 796 # Enables. |
782 "-Wendif-labels", # Weird old-style text after an #endif. | 797 "-Wendif-labels", # Weird old-style text after an #endif. |
783 "-Werror", # Warnings as errors. | 798 "-Werror", # Warnings as errors. |
784 | 799 |
785 # Disables. | 800 # Disables. |
786 "-Wno-missing-field-initializers", # "struct foo f = {0};" | 801 "-Wno-missing-field-initializers", # "struct foo f = {0};" |
787 "-Wno-unused-parameter", # Unused function parameters. | 802 "-Wno-unused-parameter", # Unused function parameters. |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 cflags += [ "-gsplit-dwarf" ] | 1096 cflags += [ "-gsplit-dwarf" ] |
1082 } | 1097 } |
1083 } | 1098 } |
1084 } | 1099 } |
1085 | 1100 |
1086 config("no_symbols") { | 1101 config("no_symbols") { |
1087 if (!is_win) { | 1102 if (!is_win) { |
1088 cflags = [ "-g0" ] | 1103 cflags = [ "-g0" ] |
1089 } | 1104 } |
1090 } | 1105 } |
OLD | NEW |