[CMake] Set the default ABI version for Fuchsia in CMake as well

This is neeeded since the CMake value is used for the SOVERSION.

Differential Revision: https://reviews.llvm.org/D45529

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329983 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Petr Hosek
2018-04-13 01:59:15 +00:00
parent a9d48f24c5
commit 5558aff7ce

View File

@@ -97,7 +97,12 @@ option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON)
cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
"Install libc++experimental.a" ON
"LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
if (FUCHSIA)
set(DEFAULT_ABI_VERSION 2)
else()
set(DEFAULT_ABI_VERSION 1)
endif()
set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of libc++.")
option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
@@ -619,7 +624,7 @@ if (LIBCXX_STANDALONE_BUILD)
endif()
# Configuration file flags =====================================================
if (NOT LIBCXX_ABI_VERSION EQUAL "1")
if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
endif()
config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)