From 94223374c87571a83c884f8845e2de52c9fd9c3f Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Tue, 8 May 2018 17:37:29 +0800 Subject: [PATCH] libctuils: Exclude qtaguid.cpp from VNDK-SP variant This commit excludes `qtaguid.cpp` from the VNDK-SP variant of `libcutils.so` because the interface of `libnetd_client.so` may vary between AOSP releases. Besides, these functions don't work in vendor processes either because VNDK-SP libraries are loaded in an isolated `vndk` linker namespace, which cannot access `/system/lib[64]/libnetd_client.so` directly. This change makes it easier to spot the issue at build time and saves several bytes. Test: Build aosp_walleye-userdebug and /system/lib[64]/vndk-sp-$VER/libctuils.so no longer exports qtaguid_* functions. Bug: 79329469 Change-Id: Idf6b60f6e58371ea320193641669d1e4412d62b8 Merged-In: Idf6b60f6e58371ea320193641669d1e4412d62b8 (cherry picked from commit 25b742c62764db8918976d6b01801c164461bbc2) --- libcutils/Android.bp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libcutils/Android.bp b/libcutils/Android.bp index 6d00dc6ee..bcc9b1c84 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -160,6 +160,15 @@ cc_library { misc_undefined: ["integer"], }, }, + + vendor: { + exclude_srcs: [ + // qtaguid.cpp loads libnetd_client.so with dlopen(). Since + // the interface of libnetd_client.so may vary between AOSP + // releases, exclude qtaguid.cpp from the VNDK-SP variant. + "qtaguid.cpp", + ], + } }, shared_libs: ["liblog"],