New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 801351 link

Starred by 4 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

lld should support some level of incremental linking

Project Member Reported by brucedaw...@chromium.org, Jan 11 2018

Issue description

Incremental PDB generation could be a huge performance win
Avoiding writing the import .lib file when it hasn't changed and when /incremental is specified is, in some contexts, an enormous win (two orders of magnitude)
True incremental linking of the PE file would be nice-to-have

Details here: https://bugs.llvm.org/show_bug.cgi?id=35917
 

Comment 1 by tikuta@chromium.org, Jan 15 2018

Cc: tikuta@chromium.org

Comment 2 by tikuta@chromium.org, Jan 16 2018

Which args.gn are you using for the build?

My usual build settings are:

use_lld = true
is_debug = true
is_component_build = true
enable_nacl = false
target_cpu = "x86"
remove_webcore_debug_symbols=true
use_jumbo_build = true
goma_dir = "C:\src\goma\goma-win64"
use_goma = true
symbol_level = 2

With link.exe this gives us incremental linking because this is a debug/component build.

Comment 4 by dxf@google.com, Mar 22 2018

Blocking: -792131
Any updates?
Incremental debug build is so important for windows developers.

Comment 6 by tikuta@chromium.org, May 31 2018

Labels: OS-Windows
How much incremental build time is different in your typical workflow between lld and link.exe?
Currently I'm building with:
target_cpu = "x86"
enable_nacl = false
is_component_build = true
is_debug = true
use_lld = false
win_console_app = true
use_goma = true

That takes 30 seconds to incremental build.
If I turn "use_lld" on, it takes 90 seconds.

Comment 8 by tikuta@chromium.org, May 31 2018

Cc: ruiu@google.com r...@chromium.org zturner@chromium.org thakis@chromium.org
What is your main build target and the files you often modify?

Comment 9 by dxf@google.com, May 31 2018

Cc: inglorion@chromium.org
and +Bob who owns the upstream bug
I'm working on third_party/blink/renderer/core/*.
I'm building content_shell and webkit_unit_tests daily.

Or is it possible to emit .lib/.dll separately?
I think debug infos are in dll and took time to generate it, but lib can be generated much faster.

Then some dependency chain can be (partially) deserialized for blink core modified case like below.
* blink_core.dll and blink_core.lib (40~50 seconds) -> chrome.dll and chrome.lib (30 ~ 40 seconds), 70~90 seconds in total

* blink_core.lib (10 seconds?) -> chrome.dll and chrome.lib (30 ~ 40 seconds), 40~50 seconds in total
   blink_core.dll (40~50 seconds)

Sorry, I meant pdb, not dll in #12, so considered to generate dll/lib and pdb separately.
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 9 2018

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

commit e3cc83dcfbd6679c8b67b958287668e524960deb
Author: Takuto Ikuta <tikuta@chromium.org>
Date: Sat Jun 09 01:02:42 2018

Make lld only update export lib timestamp when they change

With this patch, incremental component debug build time of chrome just
after touching .\third_party\blink\renderer\core\url\dom_url.cc
becomes 50 seconds, reduced from 186 seconds without this patch.

This patch improves build by not invoking linker for some components
(blink_modules, content, chrome and etc) when building chrome after
changing only .cc files for blink_core.

Bug: 801351
Change-Id: I2731449b1f89470201c35c63eeb2d31dd5a82371
Reviewed-on: https://chromium-review.googlesource.com/1092611
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565807}
[modify] https://crrev.com/e3cc83dcfbd6679c8b67b958287668e524960deb/build/config/win/BUILD.gn

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 12 2018

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

commit 54f7be95955c9b35e64569c1d40e0c3dd097359c
Author: Mirko Bonadei <mbonadei@chromium.org>
Date: Tue Jun 12 15:49:58 2018

Defining incremental_linking_off_switch when !use_lld.

This should fix the following error on WebRTC's MSVC bots:

ERROR at //build/config/win/BUILD.gn:481:15: Undefined identifier
    ldflags = incremental_linking_off_switch

Bug: 801351
Change-Id: I3e1068360fb96bfda1e8a4acec39ec43236ec415
Reviewed-on: https://chromium-review.googlesource.com/1097224
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566438}
[modify] https://crrev.com/54f7be95955c9b35e64569c1d40e0c3dd097359c/build/config/win/BUILD.gn

I heard that splitting blink_core into 2 or more dlls made build faster.
Anyone know how to change Build.gn?
Having offline chat with yoichio, I suggested followings for faster debug blink_core link in component build.

* Use symbol_level = 1 or 0 and blink_symbol_level = 2, this may need to specify blink_symbols_config for some blink unittests.
* Investigate the possibility of specifying jumbo_component in https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/core.gni?l=76&rcl=d6870941e6becaaa00888c02c5ff7697ce2c2c6f
* Or maybe, specifying jumbo_static_library there improves link time of incremental build even when we do component build.

Actually, using separated symbol level looks not improve link time in blink_core.

Sign in to add a comment