Skip to content

Commit 9fd9263

Browse files
authored
[libc++abi] Remove support for Android 4 and older (#124054)
1 parent d7c14c8 commit 9fd9263

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

libcxxabi/src/abort_message.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,8 @@
1212
#include "abort_message.h"
1313

1414
#ifdef __BIONIC__
15-
# include <android/api-level.h>
16-
# if __ANDROID_API__ >= 21
17-
# include <syslog.h>
18-
extern "C" void android_set_abort_message(const char* msg);
19-
# else
20-
# include <assert.h>
21-
# endif // __ANDROID_API__ >= 21
15+
# include <syslog.h>
16+
extern "C" void android_set_abort_message(const char* msg);
2217
#endif // __BIONIC__
2318

2419
#if defined(__APPLE__) && __has_include(<CrashReporterClient.h>)
@@ -59,20 +54,13 @@ void __abort_message(const char* format, ...)
5954
vasprintf(&buffer, format, list);
6055
va_end(list);
6156

62-
# if __ANDROID_API__ >= 21
6357
// Show error in tombstone.
6458
android_set_abort_message(buffer);
6559

6660
// Show error in logcat.
6761
openlog("libc++abi", 0, 0);
6862
syslog(LOG_CRIT, "%s", buffer);
6963
closelog();
70-
# else
71-
// The good error reporting wasn't available in Android until L. Since we're
72-
// about to abort anyway, just call __assert2, which will log _somewhere_
73-
// (tombstone and/or logcat) in older releases.
74-
__assert2(__FILE__, __LINE__, __func__, buffer);
75-
# endif // __ANDROID_API__ >= 21
7664
#endif // __BIONIC__
7765

7866
abort();

0 commit comments

Comments
 (0)