Skip to content

Commit

Permalink
[CMake] Set the default ABI version for Fuchsia in CMake as well
Browse files Browse the repository at this point in the history
This is neeeded since the CMake value is used for the SOVERSION.

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

llvm-svn: 329983
  • Loading branch information
petrhosek committed Apr 13, 2018
1 parent 296ce3b commit de2b464
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit de2b464

Please sign in to comment.