credstore: move some libs from shared to static
These libraries are only used by this process 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.
With 3 reboots before and after I'm seeing average savings of 419KB of
storage space from installed files, 84KB private dirty memory,
485KB PSS from libraries/binary only, and 496KB PSS from everything in showmap.
go/shared-to-static for more info on how this was determined.
Test: m
Bug: 280829178
Change-Id: Ib22870d3c291e3063872934a1431b0827d67833c
diff --git a/identity/Android.bp b/identity/Android.bp
index f4fcc0a..4e1fe93 100644
--- a/identity/Android.bp
+++ b/identity/Android.bp
@@ -29,6 +29,7 @@
"identity_use_latest_hal_aidl_cpp_static",
"keymint_use_latest_hal_aidl_ndk_shared",
"keymint_use_latest_hal_aidl_cpp_static",
+ "android.hardware.identity-support-lib-deps",
],
srcs: [
@@ -43,27 +44,28 @@
],
init_rc: ["credstore.rc"],
shared_libs: [
- "android.hardware.identity-support-lib",
"android.hardware.keymaster@4.0",
"android.security.authorization-ndk",
"libbase",
"libbinder",
"libbinder_ndk",
- "libcredstore_aidl",
"libcrypto",
"libhidlbase",
- "libkeymaster4support",
- "libkeystore-attestation-application-id",
- "librkp_support",
+ "liblog",
"libutils",
"libutilscallstack",
"libvintf",
],
static_libs: [
- "android.hardware.security.rkp-V3-cpp",
"android.hardware.keymaster-V3-cpp",
+ "android.hardware.identity-support-lib",
+ "android.hardware.security.rkp-V3-cpp",
"android.security.rkp_aidl-cpp",
"libcppbor_external",
+ "libcredstore_aidl",
+ "libkeymaster4support",
+ "libkeystore-attestation-application-id",
+ "librkp_support",
],
}
@@ -89,7 +91,7 @@
path: "binder",
}
-cc_library_shared {
+cc_library_static {
name: "libcredstore_aidl",
srcs: [
":credstore_aidl",
@@ -103,6 +105,8 @@
shared_libs: [
"libbinder",
"libutils",
+ ],
+ static_libs: [
"libkeymaster4support",
],
export_shared_lib_headers: [