diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt index 5a59b58d4363..2afc69be37b8 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt @@ -299,6 +299,9 @@ if (LIBCXX_ENABLE_STATIC) else() set(MERGE_ARCHIVES_ABI_TARGET "${CMAKE_STATIC_LIBRARY_PREFIX}${LIBCXX_CXX_STATIC_ABI_LIBRARY}${CMAKE_STATIC_LIBRARY_SUFFIX}") + if (LIBCXX_CXX_ABI_LIBRARY_PATH) + set(MERGE_ARCHIVES_ABI_TARGET "${LIBCXX_CXX_ABI_LIBRARY_PATH}/${MERGE_ARCHIVES_ABI_TARGET}") + endif () endif() if (APPLE) set(MERGE_ARCHIVES_LIBTOOL "--use-libtool" "--libtool" "${CMAKE_LIBTOOL}") @@ -314,6 +317,7 @@ if (LIBCXX_ENABLE_STATIC) "${MERGE_ARCHIVES_ABI_TARGET}" "${MERGE_ARCHIVES_SEARCH_PATHS}" WORKING_DIRECTORY ${LIBCXX_BUILD_DIR} + DEPENDS ${MERGE_ARCHIVES_ABI_TARGET} ) endif() endif() diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index 50afdf6890a3..ea8c54589006 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -302,6 +302,7 @@ if (LIBCXXABI_ENABLE_STATIC) "$" "$" WORKING_DIRECTORY ${LIBCXXABI_BUILD_DIR} + DEPENDS unwind_static ) endif() endif()