[libc++] Remove support for Android 4 and older (#124062)
This commit is contained in:
parent
9fd9263474
commit
6bc68d0fe9
@ -18,9 +18,6 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <__cxx03/android/api-level.h>
|
#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
|
// 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
|
// 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
|
// In NDK versions later than 16, locale-aware functions are provided by
|
||||||
// legacy_stdlib_inlines.h
|
// legacy_stdlib_inlines.h
|
||||||
# if __NDK_MAJOR__ <= 16
|
# if __NDK_MAJOR__ <= 16
|
||||||
# if __ANDROID_API__ < 21
|
# if __ANDROID_API__ < 26
|
||||||
# include <__cxx03/__support/xlocale/__strtonum_fallback.h>
|
|
||||||
# elif __ANDROID_API__ < 26
|
|
||||||
|
|
||||||
inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
|
inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
|
||||||
return ::strtof(__nptr, __endptr);
|
return ::strtof(__nptr, __endptr);
|
||||||
|
@ -18,9 +18,6 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <android/api-level.h>
|
#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
|
// 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
|
// 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
|
// In NDK versions later than 16, locale-aware functions are provided by
|
||||||
// legacy_stdlib_inlines.h
|
// legacy_stdlib_inlines.h
|
||||||
# if __NDK_MAJOR__ <= 16
|
# if __NDK_MAJOR__ <= 16
|
||||||
# if __ANDROID_API__ < 21
|
# if __ANDROID_API__ < 26
|
||||||
# include <__support/xlocale/__strtonum_fallback.h>
|
|
||||||
# elif __ANDROID_API__ < 26
|
|
||||||
|
|
||||||
inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
|
inline _LIBCPP_HIDE_FROM_ABI float strtof_l(const char* __nptr, char** __endptr, locale_t) {
|
||||||
return ::strtof(__nptr, __endptr);
|
return ::strtof(__nptr, __endptr);
|
||||||
|
@ -13,13 +13,8 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#ifdef __BIONIC__
|
#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);
|
extern "C" void android_set_abort_message(const char* msg);
|
||||||
# else
|
|
||||||
# include <assert.h>
|
|
||||||
# endif // __ANDROID_API__ >= 21
|
|
||||||
#endif // __BIONIC__
|
#endif // __BIONIC__
|
||||||
|
|
||||||
#if defined(__APPLE__) && __has_include(<CrashReporterClient.h>)
|
#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__)
|
#elif defined(__BIONIC__)
|
||||||
vasprintf(&buffer, format, list);
|
vasprintf(&buffer, format, list);
|
||||||
|
|
||||||
# if __ANDROID_API__ >= 21
|
|
||||||
// Show error in tombstone.
|
// Show error in tombstone.
|
||||||
android_set_abort_message(buffer);
|
android_set_abort_message(buffer);
|
||||||
|
|
||||||
@ -62,12 +56,6 @@ _LIBCPP_WEAK void __libcpp_verbose_abort(char const* format, ...) _LIBCPP_VERBOS
|
|||||||
openlog("libc++", 0, 0);
|
openlog("libc++", 0, 0);
|
||||||
syslog(LOG_CRIT, "%s", buffer);
|
syslog(LOG_CRIT, "%s", buffer);
|
||||||
closelog();
|
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
|
#endif
|
||||||
va_end(list);
|
va_end(list);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user