From fd4b8f570c9844104fdd69eaf6797e2be3b0dc44 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 1 May 2020 22:50:55 +0000 Subject: 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 --- pr/tests/Makefile.in | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.1