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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 cflags += [ | 139 cflags += [ |
140 # cmd.exe doesn't understand ANSI escape codes by default, | 140 # cmd.exe doesn't understand ANSI escape codes by default, |
141 # so only enable them if something emulating them is around. | 141 # so only enable them if something emulating them is around. |
142 "-fansi-escape-codes", | 142 "-fansi-escape-codes", |
143 ] | 143 ] |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 if (is_syzyasan) { | 147 if (is_syzyasan) { |
148 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. | 148 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. |
| 149 assert(!is_win_fastlink, "/PROFILE and /DEBUG:FASTLINK are incompatible") |
149 ldflags += [ "/PROFILE" ] | 150 ldflags += [ "/PROFILE" ] |
150 } | 151 } |
151 } else { | 152 } else { |
152 # Common GCC compiler flags setup. | 153 # Common GCC compiler flags setup. |
153 # -------------------------------- | 154 # -------------------------------- |
154 cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 | 155 cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204 |
155 cflags_cc += [ | 156 cflags_cc += [ |
156 "-fno-threadsafe-statics", | 157 "-fno-threadsafe-statics", |
157 | 158 |
158 # Not exporting C++ inline functions can generally be applied anywhere | 159 # Not exporting C++ inline functions can generally be applied anywhere |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 # Symbols ---------------------------------------------------------------------- | 1239 # Symbols ---------------------------------------------------------------------- |
1239 | 1240 |
1240 config("symbols") { | 1241 config("symbols") { |
1241 if (is_win) { | 1242 if (is_win) { |
1242 import("//build/toolchain/goma.gni") | 1243 import("//build/toolchain/goma.gni") |
1243 if (use_goma) { | 1244 if (use_goma) { |
1244 cflags = [ "/Z7" ] # No PDB file | 1245 cflags = [ "/Z7" ] # No PDB file |
1245 } else { | 1246 } else { |
1246 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. | 1247 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. |
1247 } | 1248 } |
1248 ldflags = [ "/DEBUG" ] | 1249 if (is_win_fastlink) { |
| 1250 # Tell VS 2015+ to create a PDB that references debug |
| 1251 # information in .obj and .lib files instead of copying |
| 1252 # it all. This flag is incompatible with /PROFILE |
| 1253 ldflags = [ "/DEBUG:FASTLINK" ] |
| 1254 } else { |
| 1255 ldflags = [ "/DEBUG" ] |
| 1256 } |
1249 } else { | 1257 } else { |
1250 cflags = [ "-g2" ] | 1258 cflags = [ "-g2" ] |
1251 if (use_debug_fission) { | 1259 if (use_debug_fission) { |
1252 cflags += [ "-gsplit-dwarf" ] | 1260 cflags += [ "-gsplit-dwarf" ] |
1253 } | 1261 } |
1254 } | 1262 } |
1255 } | 1263 } |
1256 | 1264 |
1257 config("minimal_symbols") { | 1265 config("minimal_symbols") { |
1258 if (is_win) { | 1266 if (is_win) { |
1259 # Linker symbols for backtraces only. | 1267 # Linker symbols for backtraces only. |
1260 ldflags = [ "/DEBUG" ] | 1268 if (is_win_fastlink) { |
| 1269 # Tell VS 2015+ to create a PDB that references debug |
| 1270 # information in .obj and .lib files instead of copying |
| 1271 # it all. This flag is incompatible with /PROFILE |
| 1272 ldflags = [ "/DEBUG:FASTLINK" ] |
| 1273 } else { |
| 1274 ldflags = [ "/DEBUG" ] |
| 1275 } |
1261 } else { | 1276 } else { |
1262 cflags = [ "-g1" ] | 1277 cflags = [ "-g1" ] |
1263 if (use_debug_fission) { | 1278 if (use_debug_fission) { |
1264 cflags += [ "-gsplit-dwarf" ] | 1279 cflags += [ "-gsplit-dwarf" ] |
1265 } | 1280 } |
1266 } | 1281 } |
1267 } | 1282 } |
1268 | 1283 |
1269 config("no_symbols") { | 1284 config("no_symbols") { |
1270 if (!is_win) { | 1285 if (!is_win) { |
1271 cflags = [ "-g0" ] | 1286 cflags = [ "-g0" ] |
1272 } | 1287 } |
1273 } | 1288 } |
OLD | NEW |