Chromium on VS2010 and incremental linking

69 views
Skip to first unread message

Scott Graham

unread,
Sep 23, 2011, 1:58:16 PM9/23/11
to gyp-developer
Hi,

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

Jói Sigurðsson

unread,
Sep 26, 2011, 6:18:27 AM9/26/11
to Scott Graham, gyp-developer
For myself personally, I would be okay with #1, but I think #2 is what
will make the highest number of Windows developers happy.

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

Dirk Pranke

unread,
Sep 26, 2011, 12:40:39 PM9/26/11
to Scott Graham, gyp-developer
On Fri, Sep 23, 2011 at 10:58 AM, Scott Graham <sco...@chromium.org> wrote:
> Hi,
>
> 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.
>

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

Reply all
Reply to author
Forward
0 new messages