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
(cherry picked from commit 51e607056dd0db93ef683d05349dd98648c47e47)
diff --git a/libbacktrace/Android.mk b/libbacktrace/Android.mk
index d5a7e06..ee25e08 100644
--- a/libbacktrace/Android.mk
+++ b/libbacktrace/Android.mk
@@ -87,7 +87,7 @@
BacktraceOffline.cpp \
# Use shared llvm library on device to save space.
-libbacktrace_offline_shared_libraries := \
+libbacktrace_offline_shared_libraries_target := \
libbacktrace \
libbase \
liblog \
@@ -95,25 +95,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 := \
+libbacktrace_offline_static_libraries_host := \
+ libbacktrace \
+ libunwind \
+ libziparchive-host \
+ libz \
+ libbase \
+ liblog \
+ libutils \
libLLVMObject \
libLLVMBitReader \
libLLVMMC \
@@ -122,8 +117,11 @@
libLLVMSupport \
module := libbacktrace_offline
+build_type := target
+build_target := STATIC_LIBRARY
+libbacktrace_offline_multilib := both
+include $(LOCAL_PATH)/Android.build.mk
build_type := host
-libbacktrace_multilib := both
include $(LOCAL_PATH)/Android.build.mk
#-------------------------------------------------------------------------
@@ -170,13 +168,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 \