From: David Major Date: Mon, 4 Feb 2019 21:13:43 +0000 (+0000) Subject: gn build: Windows: write PDBs when is_debug X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e10d473a5e60efd117d2df6522de204c0111695;p=llvm 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353093 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/gn/build/BUILD.gn b/utils/gn/build/BUILD.gn index cd22d21bcb4..e33cde23773 100644 --- a/utils/gn/build/BUILD.gn +++ b/utils/gn/build/BUILD.gn @@ -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.