From 705353ae277e408e70169c0811c5d104a3b733f6 Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Wed, 11 Jan 2017 14:03:11 -0800 Subject: [PATCH 1/2] Remove "_static" and "_host" suffix from libext4_utils. Bug: 34220783 Change-Id: I967dbaa9c48ad1feed2369c3a40f745b86a350f8 --- adb/Android.mk | 2 +- fastboot/Android.mk | 2 +- fs_mgr/Android.mk | 2 +- init/Android.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/adb/Android.mk b/adb/Android.mk index fab8c8780..49e492c30 100644 --- a/adb/Android.mk +++ b/adb/Android.mk @@ -336,7 +336,7 @@ LOCAL_STATIC_LIBRARIES := \ libfec_rs \ libselinux \ liblog \ - libext4_utils_static \ + libext4_utils \ libsquashfs_utils \ libcutils \ libbase \ diff --git a/fastboot/Android.mk b/fastboot/Android.mk index 286de5bee..26333f922 100644 --- a/fastboot/Android.mk +++ b/fastboot/Android.mk @@ -57,7 +57,7 @@ LOCAL_C_INCLUDES_windows := development/host/windows/usb/api LOCAL_STATIC_LIBRARIES := \ libziparchive \ - libext4_utils_host \ + libext4_utils \ libsparse_host \ libutils \ liblog \ diff --git a/fs_mgr/Android.mk b/fs_mgr/Android.mk index d6b699bdd..f929338da 100644 --- a/fs_mgr/Android.mk +++ b/fs_mgr/Android.mk @@ -9,7 +9,7 @@ common_static_libraries := \ libbase \ libcrypto_utils \ libcrypto \ - libext4_utils_static \ + libext4_utils \ libsquashfs_utils \ libselinux diff --git a/init/Android.mk b/init/Android.mk index 111fe895f..60b37b94b 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -92,7 +92,7 @@ LOCAL_STATIC_LIBRARIES := \ libsquashfs_utils \ liblogwrap \ libcutils \ - libext4_utils_static \ + libext4_utils \ libbase \ libc \ libselinux \ From b0c395955df706c4c453c0dddc13a4f5f7ca44bf Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Wed, 11 Jan 2017 14:37:50 -0800 Subject: [PATCH 2/2] Remove "_host" and "_static" suffix from libsparse definition. This now combines all the "libsparse" libraries into the same soong target. A minor side-effect of this change is that the libsparse static library depends on the libz shared library instead of the libz static library. This minor change has no effect since targets using the static libsparse library need to explicitly include either the static libz or the shared one. Bug: 34220783 Change-Id: I8f41586cf4c3336791cfa57ab4f5ae59a76d7ffa --- fastboot/Android.mk | 2 +- fs_mgr/Android.mk | 2 +- init/Android.mk | 2 +- libsparse/Android.bp | 37 +++++++++++++------------------------ 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/fastboot/Android.mk b/fastboot/Android.mk index 26333f922..5610cc089 100644 --- a/fastboot/Android.mk +++ b/fastboot/Android.mk @@ -58,7 +58,7 @@ LOCAL_C_INCLUDES_windows := development/host/windows/usb/api LOCAL_STATIC_LIBRARIES := \ libziparchive \ libext4_utils \ - libsparse_host \ + libsparse \ libutils \ liblog \ libz \ diff --git a/fs_mgr/Android.mk b/fs_mgr/Android.mk index f929338da..44d68a7e4 100644 --- a/fs_mgr/Android.mk +++ b/fs_mgr/Android.mk @@ -52,7 +52,7 @@ LOCAL_STATIC_LIBRARIES := libfs_mgr \ libcutils \ liblog \ libc \ - libsparse_static \ + libsparse \ libz \ libselinux LOCAL_CXX_STL := libc++_static diff --git a/init/Android.mk b/init/Android.mk index 60b37b94b..661569242 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -101,7 +101,7 @@ LOCAL_STATIC_LIBRARIES := \ libcrypto \ libc++_static \ libdl \ - libsparse_static \ + libsparse \ libz \ libprocessgroup \ libnl \ diff --git a/libsparse/Android.bp b/libsparse/Android.bp index 7a6ae8a54..dd8b5fd1d 100644 --- a/libsparse/Android.bp +++ b/libsparse/Android.bp @@ -1,7 +1,9 @@ // Copyright 2010 The Android Open Source Project -cc_defaults { - name: "libsparse_defaults", +cc_library { + name: "libsparse", + host_supported: true, + unique_host_soname: true, srcs: [ "backed_block.c", "output_file.c", @@ -13,32 +15,19 @@ cc_defaults { cflags: ["-Werror"], local_include_dirs: ["include"], export_include_dirs: ["include"], -} - -cc_library_host_static { - name: "libsparse_host", - defaults: ["libsparse_defaults"], - static_libs: ["libz"], target: { + host: { + shared_libs: ["libz-host"], + }, + android: { + shared_libs: ["libz"], + }, windows: { enabled: true, }, }, } -cc_library_shared { - name: "libsparse", - defaults: ["libsparse_defaults"], - shared_libs: ["libz"], -} - -cc_library_static { - name: "libsparse_static", - host_supported: true, - defaults: ["libsparse_defaults"], - static_libs: ["libz"], -} - cc_binary { name: "simg2img", host_supported: true, @@ -47,7 +36,7 @@ cc_binary { "sparse_crc32.c", ], static_libs: [ - "libsparse_static", + "libsparse", "libz", ], @@ -59,7 +48,7 @@ cc_binary { host_supported: true, srcs: ["img2simg.c"], static_libs: [ - "libsparse_static", + "libsparse", "libz", ], @@ -70,7 +59,7 @@ cc_binary_host { name: "append2simg", srcs: ["append2simg.c"], static_libs: [ - "libsparse_static", + "libsparse", "libz", ],