diff options
| author | Steven Moreland <smoreland@google.com> | 2019-06-17 17:18:02 -0700 |
|---|---|---|
| committer | Steven Moreland <smoreland@google.com> | 2019-06-19 16:02:58 -0700 |
| commit | 09a8725d56b168668a11530537c9738f4bc58a90 (patch) | |
| tree | 3dfcd4a445398c3c1f3727cb6517b7d36198e985 | |
| parent | 1ab3b13ae5dfc07f1311a07d09e654b1cfc9c012 (diff) | |
| download | platform_system_libhwbinder-android10-tests-release.tar.gz platform_system_libhwbinder-android10-tests-release.tar.bz2 platform_system_libhwbinder-android10-tests-release.zip | |
Allow libhwbinder to be combined into libhidlbase.android-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android-cts-10.0_r2android10-tests-releaseandroid10-tests-devandroid10-dev
For memory. All libhwbinder symbols are moved into
libhwbinder-impl-internal.
Bug: 134961554
Test: boot
Change-Id: I2ff817696a2185bbb5e0bea1e8e2e10561b73694
| -rw-r--r-- | Android.bp | 96 | ||||
| -rw-r--r-- | vts/performance/Android.bp | 4 |
2 files changed, 78 insertions, 22 deletions
@@ -18,27 +18,10 @@ subdirs = [ cc_defaults { name: "libhwbinder_defaults", - shared_libs: [ - "libbase", - "liblog", - "libcutils", - "libutils", - "libbinderthreadstate", - ], - export_shared_lib_headers: [ - "libbase", - "libutils", - ], + export_include_dirs: ["include"], include_dirs: ["frameworks/native/include"], - recovery_available: true, - vendor_available: true, - vndk: { - enabled: true, - support_system_process: true, - }, - clang: true, sanitize: { misc_undefined: ["integer"], }, @@ -67,22 +50,87 @@ cc_defaults { ], } +cc_defaults { + name: "libhwbinder-impl-shared-libs", + defaults: ["libhwbinder-impl-shared-libs-no-vndk-private"], + shared_libs: [ + "libbinderthreadstate", + ], +} + +cc_defaults { + name: "libhwbinder-impl-shared-libs-no-vndk-private", + shared_libs: [ + "libbase", + "liblog", + "libcutils", + "libutils", + ], + export_shared_lib_headers: [ + "libbase", + "libutils", + ], +} + +// WARNING: this should no longer be used cc_library { name: "libhwbinder", + recovery_available: true, + vendor_available: true, + vndk: { + enabled: true, + support_system_process: true, + }, + + export_include_dirs: ["include"], +} + +// Combined into libhidlbase for efficiency. +// Used as shared library to provide headers for libhidltransport-impl-internal. +cc_library_static { + name: "libhwbinder-impl-internal", + // TODO(b/135299443): allow this library to link against vndk-private libs + // and instead rely on the fact that users of this static library must be + // vndk (since they must use libbinderthreadstate). + include_dirs: ["frameworks/native/libs/binderthreadstate/include/"], defaults: [ "libhwbinder_defaults", + "libhwbinder-impl-shared-libs-no-vndk-private", "hwbinder_pgo", "hwbinder_lto", ], + recovery_available: true, + vendor_available: true, } // Explicitly provide a no lto, no PGO variant, to workaround the issue that we // can't detect non-lto users of the module in Android.mk. -// http://b/77320844 +// TODO(b/135558503): remove cc_library { name: "libhwbinder_noltopgo", defaults: [ "libhwbinder_defaults", + "libhwbinder-impl-shared-libs", + ], + recovery_available: true, + vendor_available: true, + vndk: { + enabled: true, + support_system_process: true, + }, +} + +// Only libhwbinder_benchmark needs to have pgo enabled. When all places +// support having PGO selectively enabled, all places can use libhwbinder. +// +// http://b/77320844 +cc_library_static { + name: "libhwbinder_pgo-impl-internal", + defaults: [ + "libhwbinder_defaults", + "libhwbinder-impl-shared-libs", + "hwbinder_benchmark_pgo", + "hwbinder_lto", ], } @@ -97,6 +145,16 @@ cc_defaults { }, } +cc_defaults { + name: "hwbinder_benchmark_pgo", + pgo: { + instrumentation: true, + profile_file: "hwbinder/hwbinder.profdata", + benchmarks: ["hwbinder_benchmark"], + enable_profile_use: true, + }, +} + // Provide lto property to build hwbinder with LTO cc_defaults { name: "hwbinder_lto", diff --git a/vts/performance/Android.bp b/vts/performance/Android.bp index b5097df..38edce5 100644 --- a/vts/performance/Android.bp +++ b/vts/performance/Android.bp @@ -22,9 +22,7 @@ cc_defaults { "-Werror", ], shared_libs: [ - "libhidlbase", - "libhidltransport", - "libhwbinder", + "libhidlbase_pgo", "liblog", "libutils", "libcutils", |
