summaryrefslogtreecommitdiff
path: root/external/nss/nss.nspr-parallel-win-debug_build.patch
blob: 86b55e1ccf7f9a396470249ea51c8b3e7eb9cd77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Änderung:        4866:23940b78e965
Nutzer:          Jan-Marek Glogowski <glogow@fbihome.de>
Datum:           Fri May 01 22:50:55 2020 +0000
Dateien:         pr/tests/Makefile.in
Beschreibung:
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


diff -r 219d131499d5 -r 23940b78e965 nss/nspr/pr/tests/Makefile.in
--- a/nss/nspr/pr/tests/Makefile.in	Mon Feb 10 20:58:42 2020 +0000
+++ b/nss/nspr/pr/tests/Makefile.in	Fri May 01 22:50:55 2020 +0000
@@ -211,6 +211,7 @@
 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