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 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 cflags += [ "-fmsc-version=1800" ] | 120 cflags += [ "-fmsc-version=1800" ] |
121 } else if (visual_studio_version == "2015") { | 121 } else if (visual_studio_version == "2015") { |
122 cflags += [ "-fmsc-version=1900" ] | 122 cflags += [ "-fmsc-version=1900" ] |
123 } | 123 } |
124 | 124 |
125 if (current_cpu == "x86") { | 125 if (current_cpu == "x86") { |
126 cflags += [ "-m32" ] | 126 cflags += [ "-m32" ] |
127 } else { | 127 } else { |
128 cflags += [ "-m64" ] | 128 cflags += [ "-m64" ] |
129 } | 129 } |
| 130 if (is_asan) { |
| 131 cflags += [ "/fallback" ] |
| 132 } |
130 if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == | 133 if (exec_script("//build/win/use_ansi_codes.py", [], "trim string") == |
131 "True") { | 134 "True") { |
132 cflags += [ | 135 cflags += [ |
133 # cmd.exe doesn't understand ANSI escape codes by default, | 136 # cmd.exe doesn't understand ANSI escape codes by default, |
134 # so only enable them if something emulating them is around. | 137 # so only enable them if something emulating them is around. |
135 "-fansi-escape-codes", | 138 "-fansi-escape-codes", |
136 ] | 139 ] |
137 } | 140 } |
138 } | 141 } |
139 } else { | 142 } else { |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 } | 695 } |
693 | 696 |
694 # default_warning_flags collects all warning flags that are used by default. | 697 # default_warning_flags collects all warning flags that are used by default. |
695 # This is in a variable instead of a config so that it can be used in | 698 # This is in a variable instead of a config so that it can be used in |
696 # both chromium_code and no_chromium_code. This way these flags are guaranteed | 699 # both chromium_code and no_chromium_code. This way these flags are guaranteed |
697 # to appear on the compile command line after -Wall. | 700 # to appear on the compile command line after -Wall. |
698 | 701 |
699 default_warning_flags = [] | 702 default_warning_flags = [] |
700 default_warning_flags_cc = [] | 703 default_warning_flags_cc = [] |
701 if (is_win) { | 704 if (is_win) { |
702 if (!is_clang || current_cpu != "x86") { | 705 # TODO(thakis): Make this unconditional once llvm.org/PR24167 is fixed. |
| 706 if (!is_clang || !is_asan) { |
703 default_warning_flags += [ "/WX" ] # Treat warnings as errors. | 707 default_warning_flags += [ "/WX" ] # Treat warnings as errors. |
704 } | 708 } |
705 | 709 |
706 default_warning_flags += [ | 710 default_warning_flags += [ |
707 # Warnings permanently disabled: | 711 # Warnings permanently disabled: |
708 | 712 |
709 # TODO(GYP) The GYP build doesn't have this globally enabled but disabled | 713 # TODO(GYP) The GYP build doesn't have this globally enabled but disabled |
710 # for a bunch of individual targets. Re-enable this globally when those | 714 # for a bunch of individual targets. Re-enable this globally when those |
711 # targets are fixed. | 715 # targets are fixed. |
712 "/wd4018", # Comparing signed and unsigned values. | 716 "/wd4018", # Comparing signed and unsigned values. |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 cflags += [ "-gsplit-dwarf" ] | 1250 cflags += [ "-gsplit-dwarf" ] |
1247 } | 1251 } |
1248 } | 1252 } |
1249 } | 1253 } |
1250 | 1254 |
1251 config("no_symbols") { | 1255 config("no_symbols") { |
1252 if (!is_win) { | 1256 if (!is_win) { |
1253 cflags = [ "-g0" ] | 1257 cflags = [ "-g0" ] |
1254 } | 1258 } |
1255 } | 1259 } |
OLD | NEW |