[PATCH] D67321: Respect CLANG_LINK_CLANG_DYLIB=ON in libclang and c-index-test
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 2 18:54:50 PDT 2020
smeenai added a comment.
Super late to the party here, sorry.
I don't understand why the type of linking needs to be changed depending on if the library is static or shared. If a static library A depends on a static library B as PRIVATE, and then executable C links to A, CMake will make sure the link line for A also includes C; you don't need INTERFACE or PUBLIC for that. https://cmake.org/pipermail/cmake/2016-May/063400.html has a good explanation of what the different link types mean for static libraries.
================
Comment at: clang/cmake/modules/AddClang.cmake:182
+ if(${TARGET_TYPE} EQUAL "STATIC_LIBRARY")
+ set(type INTERFACE)
+ endif()
----------------
Note that D74106 changes the corresponding logic in llvm_add_library to PUBLIC for this case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67321/new/
https://reviews.llvm.org/D67321
More information about the cfe-commits
mailing list