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

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

Issue 1259813002: clang/win/asan: Remove /fallback and enable warnings-as-errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « build/common.gypi ('k') | 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 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 if (current_cpu == "arm") { 7 if (current_cpu == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } else if (visual_studio_version == "2015") { 123 } else if (visual_studio_version == "2015") {
124 cflags += [ "-fmsc-version=1900" ] 124 cflags += [ "-fmsc-version=1900" ]
125 } 125 }
126 126
127 if (current_cpu == "x86") { 127 if (current_cpu == "x86") {
128 cflags += [ "-m32" ] 128 cflags += [ "-m32" ]
129 } else { 129 } else {
130 cflags += [ "-m64" ] 130 cflags += [ "-m64" ]
131 } 131 }
132 132
133 # TODO(thakis): Remove this once llvm.org/PR24167 is fixed.
134 if (is_asan) {
135 cflags += [ "/fallback" ]
136 }
137 if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == 133 if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") ==
138 "True") { 134 "True") {
139 cflags += [ 135 cflags += [
140 # cmd.exe doesn't understand ANSI escape codes by default, 136 # cmd.exe doesn't understand ANSI escape codes by default,
141 # so only enable them if something emulating them is around. 137 # so only enable them if something emulating them is around.
142 "-fansi-escape-codes", 138 "-fansi-escape-codes",
143 ] 139 ]
144 } 140 }
145 } 141 }
146 142
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 } 704 }
709 705
710 # default_warning_flags collects all warning flags that are used by default. 706 # default_warning_flags collects all warning flags that are used by default.
711 # This is in a variable instead of a config so that it can be used in 707 # This is in a variable instead of a config so that it can be used in
712 # both chromium_code and no_chromium_code. This way these flags are guaranteed 708 # both chromium_code and no_chromium_code. This way these flags are guaranteed
713 # to appear on the compile command line after -Wall. 709 # to appear on the compile command line after -Wall.
714 710
715 default_warning_flags = [] 711 default_warning_flags = []
716 default_warning_flags_cc = [] 712 default_warning_flags_cc = []
717 if (is_win) { 713 if (is_win) {
718 # TODO(thakis): Make this unconditional once llvm.org/PR24167 is fixed. 714 default_warning_flags += [
719 if (!is_clang || !is_asan) { 715 # Treat warnings as errors.
720 default_warning_flags += [ "/WX" ] # Treat warnings as errors. 716 "/WX",
721 }
722 717
723 default_warning_flags += [
724 # Warnings permanently disabled: 718 # Warnings permanently disabled:
725 719
726 # TODO(GYP) The GYP build doesn't have this globally enabled but disabled 720 # TODO(GYP) The GYP build doesn't have this globally enabled but disabled
727 # for a bunch of individual targets. Re-enable this globally when those 721 # for a bunch of individual targets. Re-enable this globally when those
728 # targets are fixed. 722 # targets are fixed.
729 "/wd4018", # Comparing signed and unsigned values. 723 "/wd4018", # Comparing signed and unsigned values.
730 724
731 # C4127: conditional expression is constant 725 # C4127: conditional expression is constant
732 # This warning can in theory catch dead code and other problems, but 726 # This warning can in theory catch dead code and other problems, but
733 # triggers in far too many desirable cases where the conditional 727 # triggers in far too many desirable cases where the conditional
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 cflags += [ "-gsplit-dwarf" ] 1258 cflags += [ "-gsplit-dwarf" ]
1265 } 1259 }
1266 } 1260 }
1267 } 1261 }
1268 1262
1269 config("no_symbols") { 1263 config("no_symbols") {
1270 if (!is_win) { 1264 if (!is_win) {
1271 cflags = [ "-g0" ] 1265 cflags = [ "-g0" ]
1272 } 1266 }
1273 } 1267 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698