Switch the loader to a noexcept version of libc++
The current external/libcxx uses the pthreads API to access EH globals,
which is unlikely to work in the loader. The new libc++ prebuilt uses
ELF TLS, which also doesn't work in the loader and crashes the arm64
loader on startup.
Bug: http://b/332594828
Test: treehugger
Change-Id: Icf40085d78cbaba751a97a1d457cb6cc7af7e065
diff --git a/linker/Android.bp b/linker/Android.bp
index e1a5a91..1ede380 100644
--- a/linker/Android.bp
+++ b/linker/Android.bp
@@ -367,7 +367,9 @@
"liblinker_main",
"liblinker_malloc",
- "libc++_static",
+ // Use a version of libc++ built without exceptions, because accessing EH globals uses
+ // ELF TLS, which is not supported in the loader.
+ "libc++_static_noexcept",
"libc_nomalloc",
"libc_dynamic_dispatch",
"libm",
@@ -434,7 +436,7 @@
"linker_debuggerd_android.cpp",
],
static_libs: [
- "libc++demangle",
+ "libc++demangle_noexcept",
"libdebuggerd_handler_fallback",
],
},