diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake --- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake +++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake @@ -102,7 +102,9 @@ "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits" ) elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi") - set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_SOURCE_DIR}/../libcxxabi/include") + if(NOT LIBCXX_CXX_ABI_INCLUDE_PATHS) + set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_SOURCE_DIR}/../libcxxabi/include") + endif() if(LIBCXX_STANDALONE_BUILD AND NOT (LIBCXX_CXX_ABI_INTREE OR HAVE_LIBCXXABI)) set(shared c++abi) @@ -116,7 +118,9 @@ "-DLIBCXX_BUILDING_LIBCXXABI" "${shared}" "${static}" "cxxabi.h;__cxxabi_config.h" "") elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt") - set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1") + if(NOT LIBCXX_CXX_ABI_INCLUDE_PATHS) + set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1") + endif() setup_abi_lib( "-DLIBCXXRT" "cxxrt" "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""