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

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 11 10:25:16 PDT 2018


phosek created this revision.
phosek added reviewers: EricWF, beanz.
Herald added subscribers: cfe-commits, christof, mgorny.

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


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529

Files:
  libcxx/CMakeLists.txt


Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -97,7 +97,12 @@
 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(ABI_VERSION_DEFAULT 2)
+else()
+  set(ABI_VERSION_DEFAULT 1)
+endif()
+set(LIBCXX_ABI_VERSION ${ABI_VERSION_DEFAULT} 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 @@
 endif()
 
 # Configuration file flags =====================================================
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL ABI_VERSION_DEFAULT)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45529.142041.patch
Type: text/x-patch
Size: 1170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180411/c024b4c1/attachment.bin>


More information about the cfe-commits mailing list