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 librarieslib.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 ?