vold: move some libs from shared to static
These libraries are only used by vold on a device and gain no
benifit from being included as shared libraries.
Moving them to static saves disk space, memory, and cpu cycles from the
dynamic linker.
Checking on cuttlefish accross 3 reboots:
This saves 613827 bytes of storage from the installed-files, 44KB of
private dirty memory, 172KB of PSS when only looking at the
libraries, and 155KB of PSS when looking at libraries and heap/stack
with shomap.
go/shared-to-static for more info on how this was determined.
Test: m
Bug: 280829178
Change-Id: I29af66dd66f4087ff1820ca661dc6dc2ace841fc
diff --git a/Android.bp b/Android.bp
index 1ccfc09..7e41f22 100644
--- a/Android.bp
+++ b/Android.bp
@@ -29,6 +29,9 @@
name: "vold_default_libs",
static_libs: [
+ "android.hardware.health.storage@1.0",
+ "android.hardware.health.storage-V1-ndk",
+ "android.security.maintenance-ndk",
"libasync_safe",
"libavb",
"libbootloader_message",
@@ -47,10 +50,10 @@
"libboot_control_client",
"libbase",
"libbinder",
+ "libbinder_ndk",
"libcrypto",
"libcrypto_utils",
"libcutils",
- "libdiskconfig",
"libext4_utils",
"libf2fs_sparseblock",
"libgsi",
@@ -58,6 +61,7 @@
"libhardware_legacy",
"libincfs",
"libhidlbase",
+ "libkeymint_support",
"libkeyutils",
"liblog",
"liblogwrap",
@@ -160,13 +164,6 @@
cppflags: ["-D__ANDROID_DEBUGGABLE__"],
},
},
- shared_libs: [
- "android.hardware.health.storage@1.0",
- "android.hardware.health.storage-V1-ndk",
- "android.security.maintenance-ndk",
- "libbinder_ndk",
- "libkeymint_support",
- ],
whole_static_libs: [
"libcom.android.sysprop.apex",
"libc++fs",
@@ -182,7 +179,10 @@
],
srcs: ["main.cpp"],
- static_libs: ["libvold"],
+ static_libs: [
+ "libvold",
+ ],
+
init_rc: [
"vold.rc",
],
@@ -193,14 +193,6 @@
"fuseMedia.o",
],
- shared_libs: [
- "android.hardware.health.storage@1.0",
- "android.hardware.health.storage-V1-ndk",
- "android.security.maintenance-ndk",
- "libbinder_ndk",
- "libkeymint_support",
- ],
-
product_variables: {
arc: {
exclude_srcs: [