From 841ab06af1f7c8410596f3ea17e46b5c351f5b5c Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Tue, 2 Apr 2019 12:54:35 -0700 Subject: [PATCH] Skip checking ELF files for uninstallable soong modules If a module is uninstallable, the shared library dependencies are not set up and thus the ELF file check may fail incorrectly. In this case, there is no need to check ELF files anyway. Test: Build walleye with no-vendor-variant VNDK enabled and does not see erroneous failure anymore. Change-Id: Icd115fc82daedf11795800de5cbe87c87073586a --- core/soong_cc_prebuilt.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/soong_cc_prebuilt.mk b/core/soong_cc_prebuilt.mk index 679d5b8bb..31b0e63fd 100644 --- a/core/soong_cc_prebuilt.mk +++ b/core/soong_cc_prebuilt.mk @@ -96,9 +96,11 @@ ifdef LOCAL_USE_VNDK endif # Check prebuilt ELF binaries. -ifneq ($(LOCAL_CHECK_ELF_FILES),) -my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE) -include $(BUILD_SYSTEM)/check_elf_file.mk +ifdef LOCAL_INSTALLED_MODULE + ifneq ($(LOCAL_CHECK_ELF_FILES),) + my_prebuilt_src_file := $(LOCAL_PREBUILT_MODULE_FILE) + include $(BUILD_SYSTEM)/check_elf_file.mk + endif endif # The real dependency will be added after all Android.mks are loaded and the install paths