[PATCH] D62837: [LLD][COFF] Don't take into account the 'age' when looking for PDB type server

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 19:40:45 PDT 2019


aganea created this revision.
aganea added a reviewer: rnk.
aganea added a project: lld.
Herald added a project: LLVM.

The **age** field is only there to say how many times an OBJ or a PDB was incrementally linked. It shouldn't be used to validate the link between the OBJ and the PDB.
I've ensured that linking a large project yields the same output as link.exe without /ignore:4099
This should fix the LNK4099 issues you're seeing on Chrome.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D62837

Files:
  COFF/DebugTypes.cpp


Index: COFF/DebugTypes.cpp
===================================================================
--- COFF/DebugTypes.cpp
+++ COFF/DebugTypes.cpp
@@ -198,9 +198,9 @@
   pdb::InfoStream &Info = cantFail(PDBFile.getPDBInfoStream());
 
   // Just because a file with a matching name was found doesn't mean it can be
-  // used. The GUID and Age must match between the PDB header and the OBJ
+  // used. The GUID must match between the PDB header and the OBJ
   // TypeServer2 record. The 'Age' is used by MSVC incremental compilation.
-  if (Info.getGuid() != TS.getGuid() || Info.getAge() != TS.getAge())
+  if (Info.getGuid() != TS.getGuid())
     return createFileError(
         TS.Name,
         make_error<pdb::PDBError>(pdb::pdb_error_code::signature_out_of_date));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62837.202843.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190604/bb270631/attachment.bin>


More information about the llvm-commits mailing list