Check ELF files in both paths
This commit moves prebuilt ELF file checks out of the ifeq statement so
that both modules with and without LOCAL_STRIP_MODULE can be checked.
Bug: 123670683
Test: Add `LOCAL_STRIP_MODULE := keep_symbols` to some modules and check
whether `check_elf_files.timestamp` is generated.
Change-Id: I2f2a7df501910d31621da025ce34101f0d358dc2
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index a6fa091..c0fb6cd 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -168,9 +168,6 @@
include $(BUILD_SYSTEM)/link_type.mk
endif # prebuilt_module_is_a_library
-# Check prebuilt ELF binaries.
-include $(BUILD_SYSTEM)/check_elf_file.mk
-
# The real dependency will be added after all Android.mks are loaded and the install paths
# of the shared libraries are determined.
ifdef LOCAL_INSTALLED_MODULE
@@ -209,6 +206,9 @@
# "my_strip_module not true" because otherwise the rules are defined in dynamic_binary.mk.
endif # my_strip_module not true
+# Check prebuilt ELF binaries.
+include $(BUILD_SYSTEM)/check_elf_file.mk
+
ifeq ($(NATIVE_COVERAGE),true)
ifneq (,$(strip $(LOCAL_PREBUILT_COVERAGE_ARCHIVE)))
$(eval $(call copy-one-file,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(intermediates)/$(LOCAL_MODULE).gcnodir))