diff options
author | Devin Moore <devinmoore@google.com> | 2023-05-23 23:19:49 +0000 |
---|---|---|
committer | Devin Moore <devinmoore@google.com> | 2023-05-23 23:37:43 +0000 |
commit | e1a6f71af7be99bd06c4b3dbabeb61dbe31ab26a (patch) | |
tree | 867c62697d131ebfb2d51707a700d1fcdb78467d /identity/Android.bp | |
parent | 35d845bb218d1bbb105d0756e2af5d4ff6c0ab74 (diff) | |
download | security-e1a6f71af7be99bd06c4b3dbabeb61dbe31ab26a.tar.gz |
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
Diffstat (limited to 'identity/Android.bp')
-rw-r--r-- | identity/Android.bp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/identity/Android.bp b/identity/Android.bp index f4fcc0a3..4e1fe934 100644 --- a/identity/Android.bp +++ b/identity/Android.bp @@ -29,6 +29,7 @@ cc_binary { "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 @@ cc_binary { ], 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 @@ filegroup { path: "binder", } -cc_library_shared { +cc_library_static { name: "libcredstore_aidl", srcs: [ ":credstore_aidl", @@ -103,6 +105,8 @@ cc_library_shared { shared_libs: [ "libbinder", "libutils", + ], + static_libs: [ "libkeymaster4support", ], export_shared_lib_headers: [ |