From b78e60e7b7de02fed474f170c5c7a8f78f5a0e5c Mon Sep 17 00:00:00 2001 From: Christopher Ferris <cferris@google.com> Date: Tue, 26 Aug 2014 15:47:42 -0700 Subject: [PATCH] Use the default unwind code. This speeds up the debug malloc code by using the original unwinding code. The only catch is that it has to link in the libc++ arm unwind code or there will be crashes when attempting to unwind through libc++ compiled code. Bug: 16874447 (cherry picked from commit 3f7635f4906c53fa744731efc35235456b7d93bf) Change-Id: If8a3821cdd95ed481bb496bf2daab449d13790f8 --- libc/Android.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libc/Android.mk b/libc/Android.mk index fb03c396e..31807ddc3 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -1089,7 +1089,6 @@ LOCAL_CPPFLAGS := $(libc_common_cppflags) # Make sure that unwind.h comes from libunwind. LOCAL_C_INCLUDES := \ - external/libunwind/include \ $(libc_common_c_includes) \ LOCAL_SRC_FILES := \ @@ -1105,7 +1104,9 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_SHARED_LIBRARIES := libc libdl LOCAL_SYSTEM_SHARED_LIBRARIES := -LOCAL_WHOLE_STATIC_LIBRARIES := libunwindbacktrace +# Only need this for arm since libc++ uses its own unwind code that +# doesn't mix with the other default unwind code. +LOCAL_STATIC_LIBRARIES_arm := libc++ LOCAL_ALLOW_UNDEFINED_SYMBOLS := true # Don't install on release build