Refactor the code.
The object hierarchy was confusing and convoluted. This removes
a lot of unnecessary code, and consolidates the BacktraceCurrent
and BacktraceThread code into BacktraceCurrent.
Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae
diff --git a/libbacktrace/Android.mk b/libbacktrace/Android.mk
old mode 100755
new mode 100644
index f3b28dd..20d7046
--- a/libbacktrace/Android.mk
+++ b/libbacktrace/Android.mk
@@ -16,14 +16,14 @@
LOCAL_PATH:= $(call my-dir)
-common_cflags := \
+libbacktrace_common_cflags := \
-Wall \
-Werror \
-common_conlyflags := \
+libbacktrace_common_conlyflags := \
-std=gnu99 \
-common_cppflags := \
+libbacktrace_common_cppflags := \
-std=gnu++11 \
build_host := false
@@ -37,20 +37,21 @@
# The libbacktrace library.
#-------------------------------------------------------------------------
libbacktrace_src_files := \
- BacktraceImpl.cpp \
+ Backtrace.cpp \
+ BacktraceCurrent.cpp \
BacktraceMap.cpp \
- BacktraceThread.cpp \
+ BacktracePtrace.cpp \
thread_utils.c \
-
-libbacktrace_shared_libraries_target := \
- libcutils \
-
-libbacktrace_src_files += \
+ ThreadEntry.cpp \
UnwindCurrent.cpp \
UnwindMap.cpp \
UnwindPtrace.cpp \
+libbacktrace_shared_libraries_target := \
+ libcutils \
+
libbacktrace_shared_libraries := \
+ libbase \
libunwind \
libunwind-ptrace \
@@ -86,6 +87,7 @@
module_tag := debug
build_type := target
build_target := SHARED_LIBRARY
+libbacktrace_test_multilib := both
include $(LOCAL_PATH)/Android.build.mk
build_type := host
include $(LOCAL_PATH)/Android.build.mk
@@ -124,6 +126,7 @@
module_tag := debug
build_type := target
build_target := NATIVE_TEST
+backtrace_test_multilib := both
include $(LOCAL_PATH)/Android.build.mk
build_type := host
include $(LOCAL_PATH)/Android.build.mk