[libcxx-commits] [libcxx] 6bc68d0 - [libc++] Remove support for Android 4 and older (#124062)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 23 01:27:30 PST 2025


Author: Brad Smith
Date: 2025-01-23T10:27:26+01:00
New Revision: 6bc68d0fe94e7fbdec40e1306bf8db1b0db3110c

URL: https://github.com/llvm/llvm-project/commit/6bc68d0fe94e7fbdec40e1306bf8db1b0db3110c
DIFF: https://github.com/llvm/llvm-project/commit/6bc68d0fe94e7fbdec40e1306bf8db1b0db3110c.diff

LOG: [libc++] Remove support for Android 4 and older (#124062)

Added: 
    

Modified: 
    libcxx/include/__cxx03/__locale_dir/locale_base_api/android.h
    libcxx/include/__locale_dir/locale_base_api/android.h
    libcxx/src/verbose_abort.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__cxx03/__locale_dir/locale_base_api/android.h b/libcxx/include/__cxx03/__locale_dir/locale_base_api/android.h
index 265dbf892a54f6..e96e64d9816474 100644
--- a/libcxx/include/__cxx03/__locale_dir/locale_base_api/android.h
+++ b/libcxx/include/__cxx03/__locale_dir/locale_base_api/android.h
@@ -18,9 +18,6 @@ extern "C" {
 }
 
 #include <__cxx03/android/api-level.h>
-#if __ANDROID_API__ < 21
-#  include <__cxx03/__support/xlocale/__posix_l_fallback.h>
-#endif
 
 // If we do not have this header, we are in a platform build rather than an NDK
 // build, which will always be at least as new as the ToT NDK, in which case we
@@ -30,9 +27,7 @@ extern "C" {
 // In NDK versions later than 16, locale-aware functions are provided by
 // legacy_stdlib_inlines.h
 #  if __NDK_MAJOR__ <= 16
-#    if __ANDROID_API__ < 21
-#      include <__cxx03/__support/xlocale/__strtonum_fallback.h>
-#    elif __ANDROID_API__ < 26
+#    if __ANDROID_API__ < 26
 
 inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
   return ::strtof(__nptr, __endptr);

diff  --git a/libcxx/include/__locale_dir/locale_base_api/android.h b/libcxx/include/__locale_dir/locale_base_api/android.h
index 08ef5407dedf4e..36b8d93e1b228c 100644
--- a/libcxx/include/__locale_dir/locale_base_api/android.h
+++ b/libcxx/include/__locale_dir/locale_base_api/android.h
@@ -18,9 +18,6 @@ extern "C" {
 }
 
 #include <android/api-level.h>
-#if __ANDROID_API__ < 21
-#  include <__support/xlocale/__posix_l_fallback.h>
-#endif
 
 // If we do not have this header, we are in a platform build rather than an NDK
 // build, which will always be at least as new as the ToT NDK, in which case we
@@ -30,9 +27,7 @@ extern "C" {
 // In NDK versions later than 16, locale-aware functions are provided by
 // legacy_stdlib_inlines.h
 #  if __NDK_MAJOR__ <= 16
-#    if __ANDROID_API__ < 21
-#      include <__support/xlocale/__strtonum_fallback.h>
-#    elif __ANDROID_API__ < 26
+#    if __ANDROID_API__ < 26
 
 inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
   return ::strtof(__nptr, __endptr);

diff  --git a/libcxx/src/verbose_abort.cpp b/libcxx/src/verbose_abort.cpp
index 6704709d247ca1..fd6bc4943d6bab 100644
--- a/libcxx/src/verbose_abort.cpp
+++ b/libcxx/src/verbose_abort.cpp
@@ -13,13 +13,8 @@
 #include <cstdlib>
 
 #ifdef __BIONIC__
-#  include <android/api-level.h>
-#  if __ANDROID_API__ >= 21
-#    include <syslog.h>
+#  include <syslog.h>
 extern "C" void android_set_abort_message(const char* msg);
-#  else
-#    include <assert.h>
-#  endif // __ANDROID_API__ >= 21
 #endif   // __BIONIC__
 
 #if defined(__APPLE__) && __has_include(<CrashReporterClient.h>)
@@ -54,7 +49,6 @@ _LIBCPP_WEAK void __libcpp_verbose_abort(char const* format, ...) _LIBCPP_VERBOS
 #elif defined(__BIONIC__)
   vasprintf(&buffer, format, list);
 
-#  if __ANDROID_API__ >= 21
   // Show error in tombstone.
   android_set_abort_message(buffer);
 
@@ -62,12 +56,6 @@ _LIBCPP_WEAK void __libcpp_verbose_abort(char const* format, ...) _LIBCPP_VERBOS
   openlog("libc++", 0, 0);
   syslog(LOG_CRIT, "%s", buffer);
   closelog();
-#  else
-  // The good error reporting wasn't available in Android until L. Since we're
-  // about to abort anyway, just call __assert2, which will log _somewhere_
-  // (tombstone and/or logcat) in older releases.
-  __assert2(__FILE__, __LINE__, __func__, buffer);
-#  endif // __ANDROID_API__ >= 21
 #endif
   va_end(list);
 


        


More information about the libcxx-commits mailing list