From 28f96414fdacceb0682fc17f53284a54ec89500e Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Fri, 25 Jun 2021 23:36:34 +0100 Subject: [PATCH] Do not complain about unexpected lsdump files when building with prebuilt APEXes. Test: m droid SOONG_CONFIG_art_module_source_build=false Bug: 172480615 Change-Id: Ic75e769dce1ec3440407fe8e88973ae7ed25b651 --- target/product/gsi/Android.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk index ecce01a264..cb4fdcb332 100644 --- a/target/product/gsi/Android.mk +++ b/target/product/gsi/Android.mk @@ -117,7 +117,13 @@ VNDK_ABI_DUMPS := $(call find-abi-dump-paths,$(VNDK_ABI_DUMP_DIR)) NDK_ABI_DUMPS := $(call find-abi-dump-paths,$(NDK_ABI_DUMP_DIR)) PLATFORM_ABI_DUMPS := $(call find-abi-dump-paths,$(PLATFORM_ABI_DUMP_DIR)) +# Check for superfluous lsdump files. Since LSDUMP_PATHS only covers the +# libraries that can be built from source in the current build, and prebuilts of +# Mainline modules may be in use, we also allow the libs in STUB_LIBRARIES for +# NDK and platform ABIs. + $(check-vndk-abi-dump-list-timestamp): PRIVATE_LSDUMP_PATHS := $(LSDUMP_PATHS) +$(check-vndk-abi-dump-list-timestamp): PRIVATE_STUB_LIBRARIES := $(STUB_LIBRARIES) $(check-vndk-abi-dump-list-timestamp): $(eval added_vndk_abi_dumps := $(strip $(sort $(filter-out \ $(call filter-abi-dump-paths,LLNDK VNDK-SP VNDK-core,$(PRIVATE_LSDUMP_PATHS)), \ @@ -126,13 +132,15 @@ $(check-vndk-abi-dump-list-timestamp): echo -e "Found unexpected ABI reference dump files under $(VNDK_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(VNDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_vndk_abi_dumps)) ')' -delete\` to delete the dump files.") $(eval added_ndk_abi_dumps := $(strip $(sort $(filter-out \ - $(call filter-abi-dump-paths,NDK,$(PRIVATE_LSDUMP_PATHS)), \ + $(call filter-abi-dump-paths,NDK,$(PRIVATE_LSDUMP_PATHS)) \ + $(addsuffix .lsdump,$(PRIVATE_STUB_LIBRARIES)), \ $(notdir $(NDK_ABI_DUMPS)))))) $(if $(added_ndk_abi_dumps), \ echo -e "Found unexpected ABI reference dump files under $(NDK_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(NDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_ndk_abi_dumps)) ')' -delete\` to delete the dump files.") $(eval added_platform_abi_dumps := $(strip $(sort $(filter-out \ - $(call filter-abi-dump-paths,PLATFORM,$(PRIVATE_LSDUMP_PATHS)), \ + $(call filter-abi-dump-paths,PLATFORM,$(PRIVATE_LSDUMP_PATHS)) \ + $(addsuffix .lsdump,$(PRIVATE_STUB_LIBRARIES)), \ $(notdir $(PLATFORM_ABI_DUMPS)))))) $(if $(added_platform_abi_dumps), \ echo -e "Found unexpected ABI reference dump files under $(PLATFORM_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(PLATFORM_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_platform_abi_dumps)) ')' -delete\` to delete the dump files.")