[libcxx-commits] [PATCH] D114805: [NFC][libc++] Recognize int128 as an ABI affecting property

David Tenty via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 7 09:41:44 PST 2022


daltenty updated this revision to Diff 413529.
daltenty added a comment.

Rename remaining ABI lists


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114805/new/

https://reviews.llvm.org/D114805

Files:
  libcxx/CMakeLists.txt
  libcxx/include/__config
  libcxx/include/__config_site.in
  libcxx/lib/abi/CMakeLists.txt
  libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.debug.incomplete.abilist
  libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.debug.incomplete.int128.abilist
  libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.nodebug.noincomplete.abilist
  libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.nodebug.noincomplete.int128.abilist
  libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.debug.incomplete.abilist
  libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.debug.incomplete.int128.abilist
  libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.nodebug.noincomplete.abilist
  libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.nodebug.noincomplete.int128.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.debug.incomplete.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.debug.incomplete.int128.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.debug.noincomplete.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.debug.noincomplete.int128.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.nodebug.incomplete.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.nodebug.incomplete.int128.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.debug.incomplete.abilist
  libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.debug.incomplete.int128.abilist


Index: libcxx/lib/abi/CMakeLists.txt
===================================================================
--- libcxx/lib/abi/CMakeLists.txt
+++ libcxx/lib/abi/CMakeLists.txt
@@ -7,7 +7,7 @@
 # Right now, this is done by using the ABI identifier as the filename containing
 # the list of symbols exported by libc++ for that configuration, however we could
 # make it more sophisticated if the number of ABI-affecting parameters grew.
-function(cxx_abi_list_identifier result triple abi_library abi_version unstable exceptions new_delete_in_libcxx debug_mode_enabled allow_incomplete)
+function(cxx_abi_list_identifier result triple abi_library abi_version unstable exceptions new_delete_in_libcxx debug_mode_enabled allow_incomplete using_int128)
   set(abi_properties)
 
   if ("${triple}" MATCHES "darwin")
@@ -45,6 +45,11 @@
   else()
     list(APPEND abi_properties "noincomplete")
   endif()
+  if (${using_int128})
+    list(APPEND abi_properties "int128")
+  else()
+    list(APPEND abi_properties "no_int128")
+  endif()
 
   list(JOIN abi_properties "." tmp)
   set(${result} "${tmp}" PARENT_SCOPE)
@@ -64,6 +69,7 @@
   "${LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS}"
   "${LIBCXX_ENABLE_DEBUG_MODE_SUPPORT}"
   "${LIBCXX_ENABLE_INCOMPLETE_FEATURES}"
+  "${LIBCXX_USE_INT128}"
 )
 
 if (TARGET cxx_shared)
Index: libcxx/include/__config_site.in
===================================================================
--- libcxx/include/__config_site.in
+++ libcxx/include/__config_site.in
@@ -32,6 +32,7 @@
 #cmakedefine _LIBCPP_HAS_NO_WIDE_CHARACTERS
 #cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
 #cmakedefine _LIBCPP_HAS_NO_INCOMPLETE_RANGES
+#cmakedefine _LIBCPP_HAS_NO_INT128
 
 // __USE_MINGW_ANSI_STDIO gets redefined on MinGW
 #ifdef __clang__
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -821,10 +821,6 @@
 typedef unsigned int   char32_t;
 #endif
 
-#ifndef __SIZEOF_INT128__
-#define _LIBCPP_HAS_NO_INT128
-#endif
-
 #ifdef _LIBCPP_CXX03_LANG
 # define static_assert(...) _Static_assert(__VA_ARGS__)
 # define decltype(...) __decltype(__VA_ARGS__)
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -78,6 +78,7 @@
 #===============================================================================
 # Setup CMake Options
 #===============================================================================
+include(CheckCXXSymbolExists)
 include(CMakeDependentOption)
 include(HandleCompilerRT)
 
@@ -325,6 +326,10 @@
 option(LIBCXX_HERMETIC_STATIC_LIBRARY
   "Do not export any symbols from the static library." OFF)
 
+check_cxx_symbol_exists(__SIZEOF_INT128__ "" LIBCXX_HAVE_INT128)
+cmake_dependent_option(LIBCXX_USE_INT128   "Use __int128 in the library" ON
+"LIBCXX_HAVE_INT128" OFF)
+
 #===============================================================================
 # Check option configurations
 #===============================================================================
@@ -883,6 +888,7 @@
 # easier to grep for target specific flags once the feature is complete.
 config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
 config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+config_define_if_not(LIBCXX_USE_INT128 _LIBCPP_HAS_NO_INT128)
 
 if (LIBCXX_ABI_DEFINES)
   set(abi_defines)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114805.413529.patch
Type: text/x-patch
Size: 3489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220307/456f9dd4/attachment-0001.bin>


More information about the libcxx-commits mailing list