Link libc++demangle with libc++ for the device.
libc++demangle provides __cxa_demangle, which used to be a part of
libc++.so but is being moved out to save on resources since very few
libraries need it.
Test: make checkbuild
Bug: http://b/138245375
Change-Id: I677006dbbe87ccf2dd4df182114d2a6b985e3c00
diff --git a/core/cxx_stl_setup.mk b/core/cxx_stl_setup.mk
index 7d3ca5c..55c4975 100644
--- a/core/cxx_stl_setup.mk
+++ b/core/cxx_stl_setup.mk
@@ -84,6 +84,7 @@
my_ldflags += -nodefaultlibs
my_cxx_ldlibs += $($($(my_prefix)OS)_$(my_link_type)_gcclibs)
else
+ my_static_libraries += libc++demangle
ifeq (arm,$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
my_static_libraries += libunwind_llvm
my_ldflags += -Wl,--exclude-libs,libunwind_llvm.a