libbacktrace: remove exit time destructors.
If libbacktrace is statically linked into a library that interposes
libc, exit-time destructors can lead to a segfault upon exit if static
variables are used after their destruction.
Remove the one use of a static variable (with inconsequential
performance impact of less than 1us per backtrace), and enable
-Wexit-time-destructors to ensure this stays fixed in the future.
Test: mma
Change-Id: Icdaf1cf1c1f166cf501d9ecd1983c44e4305f7e9
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp
index e687a68..c885c3f 100644
--- a/libunwindstack/Android.bp
+++ b/libunwindstack/Android.bp
@@ -65,6 +65,10 @@
"Symbols.cpp",
],
+ cflags: [
+ "-Wexit-time-destructors",
+ ],
+
target: {
// Always disable optimizations for host to make it easier to debug.
host: {