gn build: Windows: write PDBs when is_debug

Without /DEBUG, the /Zi doesn't on its own create PDB files.

And since ninja runs multiple compilations in parallel, we need /FS to prevent contention on PDBs.

Differential Revision: https://reviews.llvm.org/D57612

llvm-svn: 353093
This commit is contained in:
David Major 2019-02-04 21:13:43 +00:00
parent a7c957fd81
commit 3c659cb267
1 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,11 @@ config("compiler_defaults") {
]
} else {
if (is_debug) {
cflags += [ "/Zi" ]
cflags += [
"/Zi",
"/FS",
]
ldflags += [ "/DEBUG" ]
} else {
cflags += [
"/O2",
@ -57,7 +61,7 @@ config("compiler_defaults") {
# The MSVC default value (1 MB) is not enough for parsing recursive C++
# templates in Clang.
ldflags = [ "/STACK:10000000" ]
ldflags += [ "/STACK:10000000" ]
}
# Warning setup.