[all-commits] [llvm/llvm-project] 0b61f4: [CMake] Consistently use the LibXml2::LibXml2 targ...

zero9178 via All-commits all-commits at lists.llvm.org
Sat Sep 25 04:13:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b61f43b6096a9e98652991cba34e8ad44d35101
      https://github.com/llvm/llvm-project/commit/0b61f43b6096a9e98652991cba34e8ad44d35101
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2021-09-25 (Sat, 25 Sep 2021)

  Changed paths:
    M clang/tools/c-index-test/CMakeLists.txt
    M lldb/source/Host/CMakeLists.txt

  Log Message:
  -----------
  [CMake] Consistently use the LibXml2::LibXml2 target instead of LIBXML2_LIBRARIES

Linking against the LibXml2::LibXml2 target has the advantage of not only importing the library, but also adding the include path as well as any definitions the library requires. In case of a static build of libxml2, eg. a define is set on Windows to remove any DLL imports and export.

LLVM already makes use of the target, but c-index-test and lldb were still linking against the library only.

The workaround for Mac OS-X that I removed seems to have also been made redundant since https://reviews.llvm.org/D84563 I believe

Differential Revision: https://reviews.llvm.org/D109975




More information about the All-commits mailing list