forked from OSchip/llvm-project
[CMake] Fix statically linking in libcxxabi if built separately
In this case, CMake doesn't know about the c++abi target within the same CMake run. This reverts this aspect back to how it was before SVN r357811. Differential Revision: https://reviews.llvm.org/D60448 llvm-svn: 358009
This commit is contained in:
parent
7563b65ad4
commit
c90045bf10
|
@ -174,9 +174,9 @@ if (LIBCXX_ENABLE_SHARED)
|
|||
# Link against libc++abi
|
||||
if (LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY)
|
||||
if (APPLE)
|
||||
target_link_libraries(cxx_shared PRIVATE "-Wl,-force_load" "$<TARGET_LINKER_FILE:${LIBCXX_CXX_STATIC_ABI_LIBRARY}>")
|
||||
target_link_libraries(cxx_shared PRIVATE "-Wl,-force_load" "${LIBCXX_CXX_STATIC_ABI_LIBRARY}")
|
||||
else()
|
||||
target_link_libraries(cxx_shared PRIVATE "-Wl,--whole-archive,-Bstatic" "$<TARGET_LINKER_FILE:${LIBCXX_CXX_STATIC_ABI_LIBRARY}>" "-Wl,-Bdynamic,--no-whole-archive")
|
||||
target_link_libraries(cxx_shared PRIVATE "-Wl,--whole-archive,-Bstatic" "${LIBCXX_CXX_STATIC_ABI_LIBRARY}" "-Wl,-Bdynamic,--no-whole-archive")
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(cxx_shared PRIVATE "${LIBCXX_CXX_SHARED_ABI_LIBRARY}")
|
||||
|
|
Loading…
Reference in New Issue