diff options
author | Steven Moreland <smoreland@google.com> | 2019-06-12 17:19:52 -0700 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2019-06-18 22:03:54 +0000 |
commit | 1ec3b78b6739caf0d855048a304c70349611a9b0 (patch) | |
tree | 98d6a0e8bf6665860e668c3478e5f9d0d2d66e46 | |
parent | 9b90198887462249a293f242560e00993206a4e8 (diff) | |
download | core-1ec3b78b6739caf0d855048a304c70349611a9b0.tar.gz |
libprocessgroup users use libcutils
libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).
Bug: 135145426
Test: boot
Test:
BEFORE:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
28
AFTER:
$ adb shell showmap -a $(pid hwservicemanager) | grep -P "libprocessgroup|libcutils" -A1 | grep -P 'libprocessgroup|libcutils|\.bss' | awk '{s += $9}END{print s}'
12
Change-Id: I10d7c2d2b2b14cbbe0a128b9156d31206419d24c
-rw-r--r-- | libcutils/Android.bp | 8 | ||||
-rw-r--r-- | libprocessgroup/Android.bp | 53 | ||||
-rw-r--r-- | logcat/Android.bp | 2 |
3 files changed, 47 insertions, 16 deletions
diff --git a/libcutils/Android.bp b/libcutils/Android.bp index 619bc567a..df07d2956 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -169,9 +169,13 @@ cc_library { // releases, exclude qtaguid.cpp from the VNDK-SP variant. "qtaguid.cpp", ], - } + }, }, + defaults: [ + "libprocessgroup_impl_provider", + ], + shared_libs: [ "liblog", "libbase", @@ -180,11 +184,9 @@ cc_library { "libbase_headers", "libcutils_headers", "libutils_headers", - "libprocessgroup_headers", ], export_header_lib_headers: [ "libcutils_headers", - "libprocessgroup_headers", ], local_include_dirs: ["include"], diff --git a/libprocessgroup/Android.bp b/libprocessgroup/Android.bp index 0207a7540..f486d6c9d 100644 --- a/libprocessgroup/Android.bp +++ b/libprocessgroup/Android.bp @@ -14,13 +14,8 @@ cc_library_headers { }, } +// TODO: remove all usages cc_library { - srcs: [ - "cgroup_map.cpp", - "processgroup.cpp", - "sched_policy.cpp", - "task_profiles.cpp", - ], name: "libprocessgroup", host_supported: true, recovery_available: true, @@ -29,13 +24,47 @@ cc_library { enabled: true, support_system_process: true, }, - shared_libs: [ - "libbase", - "libcgrouprc", - ], - static_libs: [ - "libjsoncpp", +} + +cc_defaults { + name: "libprocessgroup_impl_libs", + target: { + linux: { + shared_libs: [ + "libbase", + "libcgrouprc", + ], + static_libs: [ + "libjsoncpp", + ], + }, + }, +} + +cc_defaults { + name: "libprocessgroup_impl_provider", + defaults: ["libprocessgroup_impl_libs"], + target: { + linux: { + whole_static_libs: [ + "libprocessgroup_impl", + ], + }, + }, +} + +cc_library { + name: "libprocessgroup_impl", + defaults: ["libprocessgroup_impl_libs"], + srcs: [ + "cgroup_map.cpp", + "processgroup.cpp", + "sched_policy.cpp", + "task_profiles.cpp", ], + host_supported: true, + recovery_available: true, + vendor_available: true, // for cutils/android_filesystem_config.h header_libs: [ "libcutils_headers", diff --git a/logcat/Android.bp b/logcat/Android.bp index 5030b1563..0543aba73 100644 --- a/logcat/Android.bp +++ b/logcat/Android.bp @@ -24,8 +24,8 @@ cc_defaults { ], shared_libs: [ "libbase", + "libcutils", "libpcrecpp", - "libprocessgroup", ], static_libs: ["liblog"], logtags: ["event.logtags"], |