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

Unified Diff: build/config/compiler/BUILD.gn

Issue 1254723012: Add support for /DEBUG:FASTLINK to gyp and gn files. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | build/config/win/visual_studio_version.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index af14840f414ee597b884d69ab350955d848a29cd..1b17f29508932fbcca4d3e24c69040056eb23cd0 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -146,6 +146,7 @@ config("compiler") {
if (is_syzyasan) {
# SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
+ assert(!is_win_fastlink, "/PROFILE and /DEBUG:FASTLINK are incompatible")
ldflags += [ "/PROFILE" ]
}
} else {
@@ -1245,7 +1246,14 @@ config("symbols") {
} else {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
}
- ldflags = [ "/DEBUG" ]
+ if (is_win_fastlink) {
+ # Tell VS 2015+ to create a PDB that references debug
+ # information in .obj and .lib files instead of copying
+ # it all. This flag is incompatible with /PROFILE
+ ldflags = [ "/DEBUG:FASTLINK" ]
+ } else {
+ ldflags = [ "/DEBUG" ]
+ }
} else {
cflags = [ "-g2" ]
if (use_debug_fission) {
@@ -1257,7 +1265,14 @@ config("symbols") {
config("minimal_symbols") {
if (is_win) {
# Linker symbols for backtraces only.
- ldflags = [ "/DEBUG" ]
+ if (is_win_fastlink) {
+ # Tell VS 2015+ to create a PDB that references debug
+ # information in .obj and .lib files instead of copying
+ # it all. This flag is incompatible with /PROFILE
+ ldflags = [ "/DEBUG:FASTLINK" ]
+ } else {
+ ldflags = [ "/DEBUG" ]
+ }
} else {
cflags = [ "-g1" ]
if (use_debug_fission) {
« no previous file with comments | « build/common.gypi ('k') | build/config/win/visual_studio_version.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698