Skip to content

Commit

Permalink
gn build: Windows: write PDBs when is_debug
Browse files Browse the repository at this point in the history
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
  • Loading branch information
David Major committed Feb 4, 2019
1 parent a7c957f commit 3c659cb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions llvm/utils/gn/build/BUILD.gn
Expand Up @@ -34,7 +34,11 @@ config("compiler_defaults") {
]
} else {
if (is_debug) {
cflags += [ "/Zi" ]
cflags += [
"/Zi",
"/FS",
]
ldflags += [ "/DEBUG" ]
} else {
cflags += [
"/O2",
Expand All @@ -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.
Expand Down

0 comments on commit 3c659cb

Please sign in to comment.