WINDOWS_EXPORT_ALL_SYMBOLS: Distinguish bigobj from cl -GL objects

The MSVC `/GL` flag generates an object of type `ANON_OBJECT_V1`.
`bigobj` has version >= 2.

Fixes: #25798
This commit is contained in:
Xuntao Chi 2025-02-22 20:58:28 +08:00 committed by Brad King
parent 96d71dbbbd
commit 08ca4fbc7a

View File

@ -469,7 +469,7 @@ static bool DumpFile(std::string const& nmPath, char const* filename,
// check for /bigobj and llvm LTO format
cmANON_OBJECT_HEADER_BIGOBJ* h =
(cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase;
if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
if (h->Sig1 == 0x0 && h->Sig2 == 0xffff && h->Version >= 2) {
// bigobj
DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
symbolDumper(