How do I merge multiple PDB files ?

Posted by blue.tuxedo on Stack Overflow See other posts from Stack Overflow or by blue.tuxedo
Published on 2009-02-09T13:20:59Z Indexed on 2010/04/14 21:33 UTC
Read the original article Hit count: 293

Filed under:
|
|

We are currently using a single command line tool to build our product on both Windows and Linux.

Si far its works nicely, allowing us to build out of source and with finer dependencies than what any of our previous build system allowed. This buys us great incremental and parallel build capabilities.

To describe shortly the build process, we get the usual:

.cpp -- cl.exe --> .obj and .pdb
multiple .obj and .pdb -- cl.exe --> single .dll .lib .pdb
multiple .obj and .pdb -- cl.exe --> single .exe .pdb

The msvc C/C++ compiler supports it adequately.

Recently the need to build a few static libraries emerged. From what we gathered, the process to build a static library is:

multiple .cpp -- cl.exe --> multiple .obj and a single .pdb
multiple .obj -- lib.exe --> a single .lib

The single .pdb means that cl.exe should only be executed once for all the .cpp sources. This single execution means that we can't parallelize the build for this static library. This is really unfortunate.

We investigated a bit further and according to the documentation (and the available command line options):

  • cl.exe does not know how to build static libraries
  • lib.exe does not know how to build .pdb files

Does anybody know a way to merge multiple PDB files ? Are we doomed to have slow builds for static libraries ? How do tools like Incredibuild work around this issue ?

© Stack Overflow or respective owner

Related posts about visual-c++

Related posts about pdb-ms