[llvm-bugs] [Bug 35917] New: lld needs to support incremental linking, including skipping updates to import .lib file

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 11 14:44:17 PST 2018


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

            Bug ID: 35917
           Summary: lld needs to support incremental linking, including
                    skipping updates to import .lib file
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: COFF
          Assignee: unassignedbugs at nondot.org
          Reporter: brucedawson at chromium.org
                CC: llvm-bugs at lists.llvm.org

Microsoft's link.exe supports incremental linking, which has two significant
advantages:

1) Changes to a few .obj files can relink a binary, even one that is 10s of MB
in size, in just a second or so.
2) When incremental linking happens the import .lib file is not modified. This
means that downstream build steps can be skipped, which can (in the case of
modifying a file in Chromium's base.dll) avoid hundreds of build steps and
several minutes of build time.

Incremental linking with link.exe is opt-in because it breaks some assumptions.
It is on by default in Chromium's component builds (and in debug builds?).
While lld is much faster than link.exe, lld is orders of magnituded slower when
incremental linking is applicable.

The not updating of the import .lib file is, potentially, a separate aspect of
this. It would be quite possible and beneficial for lld to avoid updating the
.lib file when it has not changed (but only when /incremental is specified)
while not implementing any other aspects of incremental linking. For developers
working on Chromium's base.dll this would give all of the benefits of
incremental linking.

For developers working on larger Chrome binaries (chrome.dll,
browser_tests.exe) the link time with lld is about a minute whereas incremental
linking is just a few seconds. Incrementally linking the PE file and/or the PDB
file would be extremely valuable.


The .lib file optimization should not be performed if /incremental is not
specified because it can cause build errors. If a change is made to base that
alters how printing is done then all of the code-gen steps that depend on base
*should* be rerun but when incremental linking is used these steps are not run.
This is considered an acceptable behavior when /incremental is specified but it
should not happen otherwise, probably.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180111/5b241daf/attachment.html>


More information about the llvm-bugs mailing list