[PATCH] D52397: [libc++] Remove Fuchsia-specific knowledge to pick the ABI version

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 22 16:55:41 PDT 2018


ldionne updated this revision to Diff 166621.
ldionne added a comment.

Clarify that version 2 of the ABI is _currently_ unstable, it is not _the_ unstable version.


Repository:
  rCXX libc++

https://reviews.llvm.org/D52397

Files:
  libcxx/CMakeLists.txt
  libcxx/include/__config


Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -36,11 +36,7 @@
 #define _LIBCPP_VERSION 8000
 
 #ifndef _LIBCPP_ABI_VERSION
-#  ifdef __Fuchsia__
-#    define _LIBCPP_ABI_VERSION 2
-#  else
-#    define _LIBCPP_ABI_VERSION 1
-#  endif
+#  define _LIBCPP_ABI_VERSION 1
 #endif
 
 #ifndef _LIBCPP_STD_VER
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -111,12 +111,7 @@
         "Install libc++fs.a" ON
         "LIBCXX_ENABLE_FILESYSTEM;LIBCXX_INSTALL_LIBRARY" OFF)
 
-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++.")
+set(LIBCXX_ABI_VERSION "1" CACHE STRING "ABI version of libc++. Can be either 1 or 2, where 2 is currently not stable. Defaults to 1.")
 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.")
@@ -657,7 +652,7 @@
 endif()
 
 # Configuration file flags =====================================================
-if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
+if (NOT LIBCXX_ABI_VERSION EQUAL 1)
   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: D52397.166621.patch
Type: text/x-patch
Size: 1578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180922/4b1aa304/attachment-0001.bin>


More information about the cfe-commits mailing list