<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - lld needs to support incremental linking, including skipping updates to import .lib file"
   href="https://bugs.llvm.org/show_bug.cgi?id=35917">35917</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld needs to support incremental linking, including skipping updates to import .lib file
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>COFF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>brucedawson@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>