From 7e35ee4b8b06e9fc695b46d39e8a7597abd44859 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 11 Jan 2017 23:11:40 +0000 Subject: [PATCH] [CMake][libcxx] Check that we have libcxxabi before using it When doing standalone build, check that we actually have libcxxabi before attempting to use it. Differential Revision: https://reviews.llvm.org/D28580 llvm-svn: 291723 --- libcxx/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index fb7b9457f07f..918b41258255 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -119,7 +119,8 @@ if (LIBCXX_CXX_ABI STREQUAL "default") ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include NO_DEFAULT_PATH ) - if (IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") + if ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND + IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") set(LIBCXX_CXX_ABI_INTREE 1)