[PATCH] D28855: [CMake] Copy per-component `required_libraries` into `LINK_COMPONENTS`. NFC.
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 09:36:33 PST 2019
tstellar added a comment.
Have you tried this with LLVM_LINK_LLVM_DYLIB=ON ? There is code in add_llvm_library() that changes its behavior when
ARG_LINK_COMPONENTS is set.
if(ARG_MODULE AND LLVM_EXPORT_SYMBOLS_FOR_PLUGINS AND ARG_PLUGIN_TOOL AND (WIN32 OR CYGWIN))
# On DLL platforms symbols are imported from the tool by linking against it.
set(llvm_libs ${ARG_PLUGIN_TOOL})
elseif (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS)
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
set(llvm_libs LLVM)
else()
llvm_map_components_to_libnames(llvm_libs
${ARG_LINK_COMPONENTS}
${LLVM_LINK_COMPONENTS}
)
endif()
else()
# Components have not been defined explicitly in CMake, so add the
# dependency information for this library as defined by LLVMBuild.
#
# It would be nice to verify that we have the dependencies for this library
# name, but using get_property(... SET) doesn't suffice to determine if a
# property has been set to an empty value.
get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
endif()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D28855/new/
https://reviews.llvm.org/D28855
More information about the llvm-commits
mailing list