Fix crossgen debug directory generation problems. (#12715)
authorMike McLaughlin <mikem@microsoft.com>
Tue, 11 Jul 2017 16:58:49 +0000 (09:58 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Jul 2017 16:58:49 +0000 (09:58 -0700)
commit065a5216c1d16ff519bf18c5b559c8eda276f580
treeccecb982fe8e55dea7a361c8f2f271b14c8f1579
parent6fba4442f146a38e0874e43917d6f9d5eb9d581a
Fix crossgen debug directory generation problems. (#12715)

* Fix crossgen debug directory generation problems.

The first problem was that when the existing/incoming PDB debug
directory entry was a portable PDB (MinorVersion == 0x504d), the
ngen/native PDB added had the same MinorVersion indicating that
it was a portable PDB (but it never can be).

This was fixed by setting MinorVersion to 0 when creating the
ngen PDB debug directory entry.

The second problem was that the ngen PDB entry was being created
even when crossgen was run on linux/mac, etc.

The fix was to ifdef NO_NGENPDB the save ngen PDB entry code.
src/zap/zapheaders.cpp
src/zap/zapheaders.h