diff options
Diffstat (limited to 'docs/index.rst')
-rw-r--r-- | docs/index.rst | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/docs/index.rst b/docs/index.rst index fbdade7daf27..f4bf3be9bf29 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,13 +5,14 @@ LLD is a linker from the LLVM project. That is a drop-in replacement for system linkers and runs much faster than them. It also provides features that are useful for toolchain developers. -The linker supports ELF (Unix), PE/COFF (Windows) and Mach-O (macOS) -in descending order of completeness. Internally, LLD consists of three -different linkers. The ELF port is the one that will be described in -this document. The PE/COFF port is almost complete except the lack of -the Windows debug info (PDB) support. The Mach-O port is built based -on a different architecture than the ELF or COFF ports. For the -details about Mach-O, please read :doc:`AtomLLD`. +The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and +WebAssembly in descending order of completeness. Internally, LLD consists of +several different linkers. The ELF port is the one that will be described in +this document. The PE/COFF port is almost complete except the lack of the +Windows debug info (PDB) support. The WebAssembly port is still a work in +progress (See :doc:`WebAssembly`). The Mach-O port is built based on a +different architecture than the others. For the details about Mach-O, please +read :doc:`AtomLLD`. Features -------- @@ -71,30 +72,27 @@ Performance ----------- This is a link time comparison on a 2-socket 20-core 40-thread Xeon -E5-2680 2.80 GHz machine with an SSD drive. - -LLD is much faster than the GNU linkers for large programs. That's -fast for small programs too, but because the link time is short -anyway, the difference is not very noticeable in that case. - +E5-2680 2.80 GHz machine with an SSD drive. We ran gold and lld with +or without multi-threading support. To disable multi-threading, we +added ``-no-threads`` to the command lines. + +============ =========== ============ ==================== ================== =============== ============= +Program Output size GNU ld GNU gold w/o threads GNU gold w/threads lld w/o threads lld w/threads +ffmpeg dbg 92 MiB 1.72s 1.16s 1.01s 0.60s 0.35s +mysqld dbg 154 MiB 8.50s 2.96s 2.68s 1.06s 0.68s +clang dbg 1.67 GiB 104.03s 34.18s 23.49s 14.82s 5.28s +chromium dbg 1.14 GiB 209.05s [1]_ 64.70s 60.82s 27.60s 16.70s +============ =========== ============ ==================== ================== =============== ============= + +As you can see, lld is significantly faster than GNU linkers. Note that this is just a benchmark result of our environment. Depending on number of available cores, available amount of memory or disk latency/throughput, your results may vary. -============ =========== ============ ============= ====== -Program Output size GNU ld GNU gold [1]_ LLD -ffmpeg dbg 91 MiB 1.59s 1.15s 0.78s -mysqld dbg 157 MiB 7.09s 2.49s 1.31s -clang dbg 1.45 GiB 86.76s 21.93s 8.38s -chromium dbg 1.52 GiB 142.30s [2]_ 40.86s 12.69s -============ =========== ============ ============= ====== - -.. [1] With the ``--threads`` option to enable multi-threading support. - -.. [2] Since GNU ld doesn't support the ``-icf=all`` option, we - removed that from the command line for GNU ld. GNU ld would be - slower than this if it had that option support. For gold and - LLD, we use ``-icf=all``. +.. [1] Since GNU ld doesn't support the ``-icf=all`` and + ``-gdb-index`` options, we removed them from the command line + for GNU ld. GNU ld would have been slower than this if it had + these options. Build ----- @@ -110,7 +108,7 @@ build that tree. You need `cmake` and of course a C++ compiler. .. code-block:: console - $ git clone https://github.com/llvm-project/llvm-project/ + $ git clone https://github.com/llvm-project/llvm-project-20170507 llvm-project $ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=lld -DCMAKE_INSTALL_PREFIX=/usr/local ../llvm-project/llvm @@ -175,5 +173,6 @@ document soon. NewLLD AtomLLD + WebAssembly windows_support ReleaseNotes |