Add special case for finding the in-tree ABI library.
When libcxx is built in-tree with libcxxabi it links against libcxxabi using the name of the cmake target and not the actual library name. The cmake target will not work with `find_library()`, so it needs special case handling. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220121 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,6 +27,12 @@ macro(setup_abi_lib abipathvar abidefines abilibs abifiles abidirs)
|
|||||||
# each run of find_library.
|
# each run of find_library.
|
||||||
set(LIBCXX_CXX_ABI_LIBRARIES "")
|
set(LIBCXX_CXX_ABI_LIBRARIES "")
|
||||||
foreach(alib ${abilibs})
|
foreach(alib ${abilibs})
|
||||||
|
# cxxabi is a cmake target and not a library.
|
||||||
|
# Handle this special case explicitly.
|
||||||
|
# Otherwise use find_library to locate the correct binary.
|
||||||
|
if (alib STREQUAL "cxxabi")
|
||||||
|
list(APPEND LIBCXX_CXX_ABI_LIBRARIES cxxabi)
|
||||||
|
else()
|
||||||
unset(_Res CACHE)
|
unset(_Res CACHE)
|
||||||
find_library(_Res ${alib})
|
find_library(_Res ${alib})
|
||||||
if (${_Res} STREQUAL "_Res-NOTFOUND")
|
if (${_Res} STREQUAL "_Res-NOTFOUND")
|
||||||
@@ -35,6 +41,7 @@ macro(setup_abi_lib abipathvar abidefines abilibs abifiles abidirs)
|
|||||||
message(STATUS "Adding ABI library: ${_Res}")
|
message(STATUS "Adding ABI library: ${_Res}")
|
||||||
list(APPEND LIBCXX_CXX_ABI_LIBRARIES ${_Res})
|
list(APPEND LIBCXX_CXX_ABI_LIBRARIES ${_Res})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(LIBCXX_ABILIB_FILES ${abifiles})
|
set(LIBCXX_ABILIB_FILES ${abifiles})
|
||||||
|
|||||||
Reference in New Issue
Block a user