Reject exit-time destructors in libc
Test: m libc
Bug: b/73485611
Change-Id: Idc5da0f8a21e3f58fc68085577fa5fca40057276
diff --git a/libc/Android.bp b/libc/Android.bp
index f5491f5..579c63c 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -47,6 +47,10 @@
"-Werror=int-to-pointer-cast",
"-Werror=type-limits",
"-Werror",
+
+ // Clang's exit-time destructor registration hides __dso_handle, but
+ // __dso_handle needs to have default visibility on ARM32. See b/73485611.
+ "-Wexit-time-destructors",
]
// Define some common cflags