From f792e4163d6309da3dea95ec5e5074d733505390 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 27 Jul 2018 16:05:31 -0700 Subject: [PATCH] liblp: Allow building liblp as a shared library. Bug: 79173901 Test: system image, partition_tools both build Change-Id: I70f45d4cebfbddc39d03aa3fb3a56b6c48a20d7e --- fs_mgr/Android.bp | 5 +++-- fs_mgr/liblp/Android.bp | 14 ++++---------- init/Android.mk | 1 + 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp index bf69096ad..196321c74 100644 --- a/fs_mgr/Android.bp +++ b/fs_mgr/Android.bp @@ -56,20 +56,21 @@ cc_library { "liblog", "libsquashfs_utils", "libselinux", + "liblp", ], static_libs: [ "libavb", "libfstab", "libdm", - "liblp", ], export_static_lib_headers: [ "libfstab", "libdm", + ], + export_shared_lib_headers: [ "liblp", ], whole_static_libs: [ - "liblp", "liblogwrap", "libdm", "libfstab", diff --git a/fs_mgr/liblp/Android.bp b/fs_mgr/liblp/Android.bp index 1434b212e..89282dbc2 100644 --- a/fs_mgr/liblp/Android.bp +++ b/fs_mgr/liblp/Android.bp @@ -14,7 +14,7 @@ // limitations under the License. // -cc_library_static { +cc_library { name: "liblp", host_supported: true, recovery_available: true, @@ -29,17 +29,14 @@ cc_library_static { "utility.cpp", "writer.cpp", ], - static_libs: [ + shared_libs: [ "libbase", "liblog", "libcrypto", "libcrypto_utils", "libsparse", - ], - whole_static_libs: [ "libext2_uuid", "libext4_utils", - "libsparse", "libz", ], export_include_dirs: ["include"], @@ -51,12 +48,9 @@ cc_test { cppflags: [ "-Wno-unused-parameter", ], - static_libs: [ - "libbase", - "liblog", - "libcrypto", - "libcrypto_utils", + shared_libs: [ "liblp", + "libbase", "libfs_mgr", ], srcs: [ diff --git a/init/Android.mk b/init/Android.mk index a81a0f6b0..d0cb820b5 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -67,6 +67,7 @@ LOCAL_STATIC_LIBRARIES := \ libprotobuf-cpp-lite \ libpropertyinfoserializer \ libpropertyinfoparser \ + liblp \ shared_libs := \ libcutils \