[all-commits] [llvm/llvm-project] 68294a: [include-cleaner] Fix building with LLVM_LINK_LLVM...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri Nov 18 00:30:46 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68294afa0836bb62be921e2143d147cdfdc8ba70
      https://github.com/llvm/llvm-project/commit/68294afa0836bb62be921e2143d147cdfdc8ba70
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-11-18 (Fri, 18 Nov 2022)

  Changed paths:
    M clang-tools-extra/include-cleaner/lib/CMakeLists.txt

  Log Message:
  -----------
  [include-cleaner] Fix building with LLVM_LINK_LLVM_DYLIB=ON on mingw

Make sure to use clang_target_link_libraries, which skips linking
against libraries and links against libclang-cpp instead, if
LLVM_LINK_LLVM_DYLIB is enabled.

This fixes errors like these:

ld.lld: error: duplicate symbol: clang::PPCallbacks::~PPCallbacks()
>>> defined at libclangLex.a(PPCallbacks.cpp.obj)
>>> defined at libclang-cpp.dll




More information about the All-commits mailing list