Add stacktrace config for android using the generic implementation
This change adds support for unwinding stack traces on supported android platforms (NDK 33+) to absl::GetStackTrace().
PiperOrigin-RevId: 668041186
Change-Id: Ie4c4c123686050c6b81683b71fe0246e8fa75f2b
diff --git a/absl/debugging/internal/stacktrace_config.h b/absl/debugging/internal/stacktrace_config.h
index 3929b1b..88949fe 100644
--- a/absl/debugging/internal/stacktrace_config.h
+++ b/absl/debugging/internal/stacktrace_config.h
@@ -42,6 +42,13 @@
#define ABSL_STACKTRACE_INL_HEADER \
"absl/debugging/internal/stacktrace_emscripten-inl.inc"
+#elif defined(__ANDROID__) && __ANDROID_API__ >= 33
+
+// Use the generic implementation for Android 33+ (Android T+). This is the
+// first version of Android for which <execinfo.h> implements backtrace().
+#define ABSL_STACKTRACE_INL_HEADER \
+ "absl/debugging/internal/stacktrace_generic-inl.inc"
+
#elif defined(__linux__) && !defined(__ANDROID__)
#if defined(NO_FRAME_POINTER) && \