llvm/lld
Reid Kleckner ac2226b0f5 [PDB] Improve error handling when writes fail
Handle PDB writing errors like any other error in LLD: emit an error and
continue. This allows the linker to print timing data and summary data
after linking, which can be helpful for finding PDB size problems. Also
report how large the file would have been.

Example output:

lld-link: error: Output data is larger than 4 GiB. File size would have been 6,937,108,480
lld-link: error: failed to write PDB file ./chrome.dll.pdb
                                    Summary
--------------------------------------------------------------------------------
          33282 Input OBJ files (expanded from all cmd-line inputs)
              4 PDB type server dependencies
              0 Precomp OBJ dependencies
       33396931 Input type records
... snip ...
  Input File Reading:           59756 ms ( 45.5%)
  GC:                            7500 ms (  5.7%)
  ICF:                           3336 ms (  2.5%)
  Code Layout:                   6329 ms (  4.8%)
  PDB Emission (Cumulative):    46192 ms ( 35.2%)
    Add Objects:                27609 ms ( 21.0%)
      Type Merging:             16740 ms ( 12.8%)
      Symbol Merging:           10761 ms (  8.2%)
    Publics Stream Layout:       9383 ms (  7.1%)
    TPI Stream Layout:           1678 ms (  1.3%)
    Commit to Disk:              3461 ms (  2.6%)
--------------------------------------------------
Total Link Time:               131244 ms (100.0%)

Differential Revision: https://reviews.llvm.org/D102713
2021-05-18 13:17:17 -07:00
..
cmake/modules [cmake] Add support for multiple distributions 2021-05-12 11:13:18 -07:00
COFF [PDB] Improve error handling when writes fail 2021-05-18 13:17:17 -07:00
Common [ELF] Simplify isValidCIdentifier. NFC 2021-03-11 09:38:15 -08:00
docs [ELF] Add -Bno-symbolic 2021-05-14 09:40:32 -07:00
ELF [lld][X86] Restore gotEntrySize. 2021-05-17 00:13:00 +01:00
include/lld [lld] Add missing header guard (NFC) 2021-04-02 11:12:23 +08:00
lib [NFC] Fix "not used" warning 2021-04-26 22:09:23 -07:00
MachO [lld/mac] Correctly set nextdefsym 2021-05-18 13:53:55 -04:00
MinGW [LLD] [MinGW] Pass the canExitEarly parameter through properly 2021-05-18 15:09:07 +03:00
test [lld][WebAssembly] Convert test to assembly. NFC. 2021-05-18 12:31:13 -07:00
tools/lld [lld] Delete unused includes. NFC 2021-04-19 10:56:49 -07:00
unittests
utils
wasm [lld][WebAssembly] Enable string tail merging in debug sections 2021-05-18 12:25:39 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [lld] Convert LLVM_CMAKE_PATH to a CMake path 2021-05-05 15:42:55 -05:00
CODE_OWNERS.TXT
LICENSE.TXT
README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.