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

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

Issue 972133002: Revert of Handle unpatched VS xtree header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 (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
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 }
58 } 51 }
59 52
60 # default_include_dirs --------------------------------------------------------- 53 # default_include_dirs ---------------------------------------------------------
61 # 54 #
62 # This is a separate config so that third_party code (which would not use the 55 # This is a separate config so that third_party code (which would not use the
63 # source root and might have conflicting versions of some headers) can remove 56 # source root and might have conflicting versions of some headers) can remove
64 # this and specify their own include paths. 57 # this and specify their own include paths.
65 config("default_include_dirs") { 58 config("default_include_dirs") {
66 include_dirs = [ 59 include_dirs = [
67 "//", 60 "//",
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 "/wd4100", # Unreferenced formal function parameter. 768 "/wd4100", # Unreferenced formal function parameter.
776 "/wd4121", # Alignment of a member was sensitive to packing. 769 "/wd4121", # Alignment of a member was sensitive to packing.
777 "/wd4244", # Conversion: possible loss of data. 770 "/wd4244", # Conversion: possible loss of data.
778 "/wd4481", # Nonstandard extension: override specifier. 771 "/wd4481", # Nonstandard extension: override specifier.
779 "/wd4505", # Unreferenced local function has been removed. 772 "/wd4505", # Unreferenced local function has been removed.
780 "/wd4510", # Default constructor could not be generated. 773 "/wd4510", # Default constructor could not be generated.
781 "/wd4512", # Assignment operator could not be generated. 774 "/wd4512", # Assignment operator could not be generated.
782 "/wd4610", # Class can never be instantiated, constructor required. 775 "/wd4610", # Class can never be instantiated, constructor required.
783 "/wd4996", # Deprecated function warning. 776 "/wd4996", # Deprecated function warning.
784 ] 777 ]
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 if (exec_script("../../win_is_xtree_patched.py", [], "value") == 1) {
791 msvs_xtree_patched = true
792 } else {
793 cflags += [ "/wd4702" ] # Unreachable code.
794 }
795 }
796 } else { 778 } else {
797 # Common GCC warning setup. 779 # Common GCC warning setup.
798 cflags = [ 780 cflags = [
799 # Enables. 781 # Enables.
800 "-Wendif-labels", # Weird old-style text after an #endif. 782 "-Wendif-labels", # Weird old-style text after an #endif.
801 "-Werror", # Warnings as errors. 783 "-Werror", # Warnings as errors.
802 784
803 # Disables. 785 # Disables.
804 "-Wno-missing-field-initializers", # "struct foo f = {0};" 786 "-Wno-missing-field-initializers", # "struct foo f = {0};"
805 "-Wno-unused-parameter", # Unused function parameters. 787 "-Wno-unused-parameter", # Unused function parameters.
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 cflags += [ "-gsplit-dwarf" ] 1081 cflags += [ "-gsplit-dwarf" ]
1100 } 1082 }
1101 } 1083 }
1102 } 1084 }
1103 1085
1104 config("no_symbols") { 1086 config("no_symbols") {
1105 if (!is_win) { 1087 if (!is_win) {
1106 cflags = [ "-g0" ] 1088 cflags = [ "-g0" ]
1107 } 1089 }
1108 } 1090 }
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