I spent some time looking into getting incremental linking working in
VS2010 for Chromium. I thought I would summarize the problems here for
future reference.
Unfortunately, the new project references method in 2010 is broken as
far as I can tell. I filed a bug here
https://connect.microsoft.com/VisualStudio/feedback/details/690486/use-library-dependency-inputs-does-not-respect-link-library-dependency-flag
but I don't particularly expect a [quick] resolution.
Possible workarounds:
1. Use a ninja port for building and just use VS as a debugger. That
would make me happy enough, but I'm not sure if others care about the
IDE for browsing, editing, etc.
2. Stick with sln/vcxproj, but generate only a few vcxprojs, rather
than the ~600 we do now. In particular, generate only 1 vcxproj per
dll or exe which directly includes .cc's that it needs (as opposed to
using libs). This avoids the bug because it enables incremental
linking without turning on ULDI. It would probably make the build
faster overall, and the VS UI more responsive too as it doesn't seem
to handle the large number of projects that well.
Of course, both are non-zero amounts of work.
In addition, there's another problem that seems to cause the objs of
the asm compiles to not be included. I suspect that may be just an
error in our project generation (related to the yasm build rules), but
haven't confirmed the root cause yet.
scott
When implementing #2, it might be good to help peoples' muscle memory
of how the Chrome projects are laid out in MSVS by moving everything
that wouldn't currently appear in a project to some filter e.g.
"dependencies from other projects" or some such. Of course, the
alternative of just reflecting the directory structure on disk might
be even more compelling... hmm... :)
Cheers,
Jói
For Chromium, at least, (2) might not be that bad as we move more
targets to work with the "component" build (which changes .libs to be
buildable as .dlls). Perhaps we should figure out which areas are not
currently buildable as components and see a high rate of change (hence
devs would most benefit from incremental linking) and work on those?
-- Dirk