[PATCH] D28397: [lld][cmake] Fix LLVM_LINK_LLVM_DYLIB build

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 05:01:11 PST 2017


labath created this revision.
labath added reviewers: ruiu, beanz.
labath added a subscriber: llvm-commits.
Herald added a subscriber: mgorny.

Lld's build had a couple of issues which prevented a successfull
LLVM_LINK_LLVM_DYLIB compilation.

- add_llvm_library vs llvm_add_library: One adds a library to libLLVM.so, other one doesn't. Lld was using the wrong one, causing symbols to be mupltiply defined in things linking to libLLVM.
- confusion when to use LINK_LIBS vs LINK_COMPONENTS in llvm_add_library
- not using LLVM_LINK_COMPONENTS for add_lld_tool

With these fixes lld compiles and it's test suite passes both in
LLVM_LINK_LLVM_DYLIB mode and without it.


https://reviews.llvm.org/D28397

Files:
  cmake/modules/AddLLD.cmake
  lib/Config/CMakeLists.txt
  lib/Core/CMakeLists.txt
  lib/Driver/CMakeLists.txt
  lib/ReaderWriter/CMakeLists.txt
  lib/ReaderWriter/MachO/CMakeLists.txt
  lib/ReaderWriter/YAML/CMakeLists.txt
  tools/lld/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28397.83359.patch
Type: text/x-patch
Size: 3060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/5d196b6e/attachment.bin>


More information about the llvm-commits mailing list