libbacktrace: only build libbacktrace_offline static library.
As device may not have libbacktrace_offline shared library, simpleperf
no longer rely on it. So there is no reason to keep libbacktrace_offline
shared library.
Bug: 28152982
Change-Id: If8e31b1434646dbbfed60264eb25f034bc5d6946
diff --git a/libbacktrace/Android.mk b/libbacktrace/Android.mk
index a8a7c4a..632b1b6 100644
--- a/libbacktrace/Android.mk
+++ b/libbacktrace/Android.mk
@@ -95,7 +95,7 @@
BacktraceOffline.cpp \
# Use shared llvm library on device to save space.
-libbacktrace_offline_shared_libraries := \
+libbacktrace_offline_shared_libraries_target := \
libbacktrace \
libbase \
liblog \
@@ -103,47 +103,20 @@
libutils \
libLLVM \
-libbacktrace_offline_static_libraries := \
+libbacktrace_offline_static_libraries_target := \
libziparchive \
libz \
-module := libbacktrace_offline
-build_type := target
-build_target := SHARED_LIBRARY
-include $(LOCAL_PATH)/Android.build.mk
-
-libbacktrace_offline_shared_libraries := \
- libbacktrace \
- libbase \
- liblog \
- libunwind \
- libziparchive-host \
-
# Use static llvm libraries on host to remove dependency on 32-bit llvm shared library
# which is not included in the prebuilt.
-libbacktrace_offline_static_libraries := \
- libLLVMObject \
- libLLVMBitReader \
- libLLVMMC \
- libLLVMMCParser \
- libLLVMCore \
- libLLVMSupport \
-
-module := libbacktrace_offline
-build_type := host
-libbacktrace_multilib := both
-include $(LOCAL_PATH)/Android.build.mk
-
-libbacktrace_offline_shared_libraries :=
-libbacktrace_offline_static_libraries := \
+libbacktrace_offline_static_libraries_host := \
libbacktrace \
- libbase \
- libcutils \
- liblog \
libunwind \
- liblzma \
- libziparchive \
+ libziparchive-host \
libz \
+ libbase \
+ liblog \
+ libutils \
libLLVMObject \
libLLVMBitReader \
libLLVMMC \
@@ -154,6 +127,9 @@
module := libbacktrace_offline
build_type := target
build_target := STATIC_LIBRARY
+libbacktrace_offline_multilib := both
+include $(LOCAL_PATH)/Android.build.mk
+build_type := host
include $(LOCAL_PATH)/Android.build.mk
#-------------------------------------------------------------------------
@@ -200,13 +176,33 @@
backtrace_test_shared_libraries := \
libbacktrace_test \
libbacktrace \
- libbacktrace_offline \
libbase \
libcutils \
+ liblog \
libunwind \
backtrace_test_shared_libraries_target += \
libdl \
+ libutils \
+ libLLVM \
+
+backtrace_test_static_libraries := \
+ libbacktrace_offline \
+
+backtrace_test_static_libraries_target := \
+ libziparchive \
+ libz \
+
+backtrace_test_static_libraries_host := \
+ libziparchive-host \
+ libz \
+ libutils \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMMC \
+ libLLVMMCParser \
+ libLLVMCore \
+ libLLVMSupport \
backtrace_test_ldlibs_host += \
-ldl \