From b5ec6a032c254bbbb8508e870035660c86485b5d Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Mon, 12 Jun 2017 10:51:34 -0700 Subject: [PATCH 1/2] Fix NDK libsync to match ndk/sync.h The header names were changed during review, but the library map file wasn't updated. Bug: 62229958 Test: CtsGraphicsTestCases:android.graphics.cts.SyncTest Merged-In: Ie5955865667b35067f1ee209933f159f170419cd Change-Id: Ie5955865667b35067f1ee209933f159f170419cd (cherry picked from commit 59d9ee5d020c54d89cbb520b30fa19765a68646d) --- libsync/libsync.map.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsync/libsync.map.txt b/libsync/libsync.map.txt index daa28ae92..f9057bd7f 100644 --- a/libsync/libsync.map.txt +++ b/libsync/libsync.map.txt @@ -17,8 +17,8 @@ LIBSYNC { global: sync_merge; # introduced=26 - sync_get_fence_info; # introduced=26 - sync_free_fence_info; # introduced=26 + sync_file_info; # introduced=26 + sync_file_info_free; # introduced=26 local: *; }; From b87f884b99e5daa74a845b3b3e8881cda88a389e Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 14 Aug 2017 15:21:28 +0900 Subject: [PATCH 2/2] Mark libsync as LL-NDK libsync is used both by platform (e.g. libui.so) and by same-process HALs (e.g. android.hardware.graphics.mapper@2.0-impl.so). Therefore it is eligible for either VNDK-SP or LL-NDK. Among the two choices, LL-NDK was selected because it is already an NDK and is just a thin wrapper around a few kernel ioctls. However, since libui (which is a vendor_available:true library) is using more symbols that are not available to NDK clients, the extra symbols are exposed as # vndk tag so that they are only available to VNDK clients, but not to NDK clients. Bug: 63866913 Test: BOARD_VNDK_VERSION=current m -j successful (2017 pixel) Test: the built image is bootable Merged-In: I60f883c049bd9b4562e6ce34d34ead47ba28af5f Change-Id: I60f883c049bd9b4562e6ce34d34ead47ba28af5f (cherry picked from commit 058e0919f6aff67d32d00591a7040fc069c6e40f) --- libsync/Android.bp | 7 ++++++- libsync/libsync.map.txt | 12 ++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libsync/Android.bp b/libsync/Android.bp index 1646348a9..3fae5e669 100644 --- a/libsync/Android.bp +++ b/libsync/Android.bp @@ -22,10 +22,15 @@ cc_defaults { cc_library_shared { name: "libsync", - vendor_available: true, defaults: ["libsync_defaults"], } +llndk_library { + name: "libsync", + symbol_file: "libsync.map.txt", + export_include_dirs: ["include"], +} + // libsync_recovery is only intended for the recovery binary. // Future versions of the kernel WILL require an updated libsync, and will break // anything statically linked against the current libsync. diff --git a/libsync/libsync.map.txt b/libsync/libsync.map.txt index f9057bd7f..53bb07a70 100644 --- a/libsync/libsync.map.txt +++ b/libsync/libsync.map.txt @@ -19,14 +19,10 @@ LIBSYNC { sync_merge; # introduced=26 sync_file_info; # introduced=26 sync_file_info_free; # introduced=26 + sync_wait; # vndk + sync_fence_info; # vndk + sync_pt_info; # vndk + sync_fence_info_free; # vndk local: *; }; - -LIBSYNC_PLATFORM { - global: - sync_wait; - sync_fence_info; - sync_pt_info; - sync_fence_info_free; -} LIBSYNC_PLATFORM;