[all-commits] [llvm/llvm-project] 6f2e92: Re-land [LLD] Allow usage of LLD as a library

Alexandre Ganea via All-commits all-commits at lists.llvm.org
Mon Jun 19 04:35:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f2e92c10cebca51f9bc98b99fa3b5583ff396c4
      https://github.com/llvm/llvm-project/commit/6f2e92c10cebca51f9bc98b99fa3b5583ff396c4
  Author: Alexandre Ganea <alex_toresh at yahoo.fr>
  Date:   2023-06-19 (Mon, 19 Jun 2023)

  Changed paths:
    M lld/CMakeLists.txt
    M lld/COFF/Driver.cpp
    M lld/Common/CMakeLists.txt
    A lld/Common/DriverDispatcher.cpp
    M lld/ELF/Driver.cpp
    M lld/MachO/Driver.cpp
    M lld/MinGW/Driver.cpp
    M lld/docs/NewLLD.rst
    M lld/docs/index.rst
    M lld/include/lld/Common/Driver.h
    M lld/test/CMakeLists.txt
    A lld/test/Unit/lit.cfg.py
    A lld/test/Unit/lit.site.cfg.py.in
    M lld/tools/lld/lld.cpp
    A lld/unittests/AsLibAll/AllDrivers.cpp
    A lld/unittests/AsLibAll/CMakeLists.txt
    A lld/unittests/AsLibELF/CMakeLists.txt
    A lld/unittests/AsLibELF/Inputs/kernel1.o
    A lld/unittests/AsLibELF/Inputs/kernel2.o
    A lld/unittests/AsLibELF/ROCm.cpp
    A lld/unittests/AsLibELF/SomeDrivers.cpp
    A lld/unittests/CMakeLists.txt
    M lld/wasm/Driver.cpp
    M llvm/cmake/modules/AddLLVM.cmake

  Log Message:
  -----------
  Re-land [LLD] Allow usage of LLD as a library

This reverts commit aa495214b39d475bab24b468de7a7c676ce9e366.

As discussed in https://github.com/llvm/llvm-project/issues/53475 this patch
allows for using LLD-as-a-lib. It also lets clients link only the drivers that
they want (see unit tests).

This also adds the unit test infra as in the other LLVM projects. Among the
test coverage, I've added the original issue from @krzysz00, see:
https://github.com/ROCmSoftwarePlatform/D108850-lld-bug-reproduction

Important note: this doesn't allow (yet) linking in parallel. This will come a
bit later hopefully, in subsequent patches, for COFF at least.

Differential revision: https://reviews.llvm.org/D119049




More information about the All-commits mailing list