New issue
Advanced search Search tips

Issue 717207 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 82385



Sign in to add a comment

clang-cl builds sometimes fall off incremental linking happy path

Project Member Reported by thakis@chromium.org, May 1 2017

Issue description

Reportedly incremental linking doesn't work for some folks in clang/win builds (https://bugs.chromium.org/p/chromium/issues/detail?id=560475#c8).

rnk says he thinks he's seen the ilk file grow over time unboundedly with each link. In that case, a workaround would be to delete the ilk from the linker wrapper if it's too large. (We should still figure out why this happens with clang-cl but not with cl, of course.)

brucedawson says he can repro with:

is_component_build = true
is_debug = false
target_cpu="x86"
dcheck_always_on = true
#is_clang = true
win_linker_timing=true

and

> touch third_party\WebKit\Source\core\animation\AnimationClock.cpp & ninja -d keeprsp -C out\release_component blink_core.dll

but it's not clear if this is with a single build or with repeated builds.

/VERBOSE:INCR (implied by setting win_linker_timing=true in args.gn) can coax link.exe into printing some incremental linking diagnostics.
 

Comment 1 by thakis@chromium.org, May 17 2017

Filling back from email: It looks like the ilk file grows to > 2GB, and incremental linking stops working at that point. Happens with /Z7 cl.exe builds too.
VS 2017 Update 3 Preview 1 fixes this. As of crrev.com/2904733004 (May 26th) this is the default package when doing VS 2017 builds. VS 2015 is still the default so you have to set GYP_MSVS_VERSION=2017 if you want VS 2017.

If you are building with a locally installed toolchain then you need to install the VS 2017 preview and set vs2017_install in order to get the build to use this version of the toolchain.

As always you can verify which build tools are being used by running ninja -v and examining the compiler/linker command lines.
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03b7f77508dff6e594b2c9f7c72c194a219a4f78

commit 03b7f77508dff6e594b2c9f7c72c194a219a4f78
Author: Nico Weber <thakis@chromium.org>
Date: Mon Jul 31 19:05:56 2017

Enable incremental linking of blink_core with MSVC2017.

Bug:  717207 ,  560475 
Change-Id: I244fab42c9148ca3a001e0c025612249e9ce599e
Reviewed-on: https://chromium-review.googlesource.com/593773
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490789}
[modify] https://crrev.com/03b7f77508dff6e594b2c9f7c72c194a219a4f78/third_party/WebKit/Source/core/BUILD.gn

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b6a5d2e9c01bc8bf50de167205ec6a2e4dce2317

commit b6a5d2e9c01bc8bf50de167205ec6a2e4dce2317
Author: Nico Weber <thakis@chromium.org>
Date: Mon Jul 31 22:41:01 2017

Reenable incremental linking of blink_core with MSVC2015.

Reverts https://chromium-review.googlesource.com/538058. It looks like
we're under the ilk limit for now after
https://codereview.chromium.org/2963773002

Makes incremental links of blink_core in clang/win builds 100x as fast.

Bug:  717207 ,  560475 
Change-Id: I51c9170c0e146eac199328a03b8e4050b30cb83c
Reviewed-on: https://chromium-review.googlesource.com/594659
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490810}
[modify] https://crrev.com/b6a5d2e9c01bc8bf50de167205ec6a2e4dce2317/third_party/WebKit/Source/core/BUILD.gn

Comment 5 by thakis@chromium.org, Jul 31 2017

Owner: thakis@chromium.org
Status: Fixed (was: Untriaged)
Most of the interesting things here happened in  bug 560475 .

Sign in to add a comment