summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-05-01 22:50:55 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2020-05-01 22:50:55 +0000
commitfd4b8f570c9844104fdd69eaf6797e2be3b0dc44 (patch)
tree8979552081865a3eb0e47efd9432b560807af3ce
parentc91b5e7214f8892a0110889b254daa009a0789f7 (diff)
downloadnspr-hg-fd4b8f570c9844104fdd69eaf6797e2be3b0dc44.tar.gz
Bug 290526 Write separate PDBs for test OBJs r=glandium
Quite often when running a parallel NSS build, I get the following compiler error message, resulting in a build failure, despite compiling with the -FS flag: .../nss/nspr/pr/tests/zerolen.c: fatal error C1041: Programmdatenbank "...\nss\nspr\out\pr\tests\vc140.pdb" kann nicht ge<94>ffnet werden; verwenden Sie /FS, wenn mehrere CL.EXE in dieselbe .PDB-Datei schreiben. The failing source file is always one of the last test object files. But the actual problem is not the compiler accessing the PDB file, but the linker already linking the first test executables accessing the shared PDB; at least that's my guess. So instead of using a shared PDB for all test object files, this uses -Fd$(@:.$(OBJ_SUFFIX)=.pdb) to write a separate PDB for every test's object file. The linker works fine with the shared OBJ PDB. Differential Revision: https://phabricator.services.mozilla.com/D68693
-rw-r--r--pr/tests/Makefile.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in
index 876a0954..a58a8469 100644
--- a/pr/tests/Makefile.in
+++ b/pr/tests/Makefile.in
@@ -211,6 +211,7 @@ ifdef NS_USE_GCC
else
EXTRA_LIBS += ws2_32.lib
LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
+ CFLAGS += -Fd$(@:.$(OBJ_SUFFIX)=.pdb)
ifdef PROFILE
LDOPTS += -PROFILE -MAP
endif # profile