[PATCH] D63881: [cmake] Fix build with BUILD_SHARED_LIBS=ON
Cristian Adam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 13:37:54 PDT 2019
cristian.adam added a comment.
In D63881#1561072 <https://reviews.llvm.org/D63881#1561072>, @compnerd wrote:
> I don't understand the change for the `PRIVATE` to `PUBLIC`. That doesn't make a different to the import library handling, which is baked right into CMake, so that will always be handled properly irrespective of the link dependency's visibility. I think the only thing that may be needed is the Core dependency on the TestPlugin.
TestPlugin depends on Core. Core depends on BinaryFormat, Remarks, and Support. If we keep `PRIVATE` then TestPlugin will also need the dependencies from Core.
By having `PUBLIC` TestPlugin will get the dependencies from Core, and <INSTALL_DIR>\lib\cmake\llvm\LLVMExports.cmake will contain:
# Create imported target LLVMCore
add_library(LLVMCore SHARED IMPORTED)
set_target_properties(LLVMCore PROPERTIES
INTERFACE_LINK_LIBRARIES "LLVMBinaryFormat;LLVMRemarks;LLVMSupport"
)
At the moment LLVM/Clang has CMake exports based on `BUILD_SHARED_LIBS` option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63881/new/
https://reviews.llvm.org/D63881
More information about the llvm-commits
mailing list