From 86e80b9be0a1fc6070ffae08e4c99d6dd577eb2a Mon Sep 17 00:00:00 2001 From: Jaekyun Seok Date: Wed, 21 Dec 2016 14:22:00 +0900 Subject: [PATCH] Use shared lib of libutils, libz and libbase. libutils, libz and libbase are being used as shared lib by many other modules. So using their shared lib will reduce total image size. Size diffs on angler build image are as follows. libziparchive.so : 103844 -> 41680 (-62164) libnativeloader.so: 50824 -> 25104 (-25720) total : (-87884) Test: building succeeded, and the image was tested on angler. Bug: 33056637 Change-Id: I015afe5b8f4d87d495b706e2e78d60f44a910e87 --- libnativeloader/Android.bp | 2 +- libziparchive/Android.bp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libnativeloader/Android.bp b/libnativeloader/Android.bp index 9d3389958..c1133fbc1 100644 --- a/libnativeloader/Android.bp +++ b/libnativeloader/Android.bp @@ -9,8 +9,8 @@ cc_library { "liblog", "libcutils", "libnativebridge", + "libbase", ], - static_libs: ["libbase"], target: { android: { shared_libs: ["libdl"], diff --git a/libziparchive/Android.bp b/libziparchive/Android.bp index fce137852..f87591511 100644 --- a/libziparchive/Android.bp +++ b/libziparchive/Android.bp @@ -56,11 +56,13 @@ cc_library { name: "libziparchive", host_supported: true, defaults: ["libziparchive_defaults", "libziparchive_flags"], - static_libs: ["libutils"], shared_libs: ["liblog", "libbase"], target: { android: { - static_libs: ["libz"], + shared_libs: ["libz", "libutils"], + }, + host: { + static_libs: ["libutils"], }, linux_bionic: { static_libs: ["libz"],