Fix linking with just-built libc++abi (added in r214037).
Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure that linker is able to locate just-built libc++abi in the build tree, instead of relying on "-lc++abi" linker flag. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214114 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0d1965d8c2
commit
e515bbda1b
@ -152,13 +152,16 @@ if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++" OR
|
||||
"${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits"
|
||||
)
|
||||
elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxabi")
|
||||
setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""
|
||||
"c++abi" "cxxabi.h" ""
|
||||
)
|
||||
|
||||
if (LIBCXX_CXX_ABI_INTREE)
|
||||
add_dependencies(LIBCXX_CXX_ABI_DEPS cxxabi)
|
||||
endif ()
|
||||
# Link against just-built "cxxabi" target.
|
||||
set(CXXABI_LIBNAME cxxabi)
|
||||
else()
|
||||
# Assume c++abi is installed in the system, rely on -lc++abi link flag.
|
||||
set(CXXABI_LIBNAME "c++abi")
|
||||
endif()
|
||||
setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""
|
||||
${CXXABI_LIBNAME} "cxxabi.h" ""
|
||||
)
|
||||
elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")
|
||||
setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT"
|
||||
"cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
|
||||
|
Loading…
Reference in New Issue
Block a user