summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-04-20 23:33:49 +0000
committerShoaib Meenai <smeenai@fb.com>2017-04-20 23:33:49 +0000
commit3d1d1eab22db1c887b035c5aedbbcb4e46913ee8 (patch)
tree5d5d833011f52b3ba360189058f24d3762a1516c /CMakeLists.txt
parenta67beb7b946e71d0338cc49389850c6384ec4716 (diff)
[libc++] Default to vcruntime when targeting MSVC
Summary: libc++abi is never the right option for LIBCXX_TARGETING_MSVC, since it targets the Itanium ABI, whereas MSVC uses the Microsoft ABI. Make the default ABI be vcruntime when targeting MSVC even if libc++abi is present in the tree. Differential Revision: https://reviews.llvm.org/D32320 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 9 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d3bd53339..ef1726b78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,21 +120,19 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include
NO_DEFAULT_PATH
)
- if ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND
- IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
+ if (LIBCXX_TARGETING_MSVC)
+ # FIXME: Figure out how to configure the ABI library on Windows.
+ set(LIBCXX_CXX_ABI_LIBNAME "vcruntime")
+ elseif ((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)
+ elseif (APPLE)
+ set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
+ set(LIBCXX_CXX_ABI_SYSTEM 1)
else()
- if (LIBCXX_TARGETING_MSVC)
- # FIXME: Figure out how to configure the ABI library on Windows.
- set(LIBCXX_CXX_ABI_LIBNAME "vcruntime")
- elseif(APPLE)
- set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
- set(LIBCXX_CXX_ABI_SYSTEM 1)
- else()
- set(LIBCXX_CXX_ABI_LIBNAME "default")
- endif()
+ set(LIBCXX_CXX_ABI_LIBNAME "default")
endif()
else()
set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")