Ban ELF prebuilts in PRODUCT_COPY_FILES
ELF prebuilts in PRODUCT_COPY_FILES are an build error.
Define prebuilt modules and add them to PRODUCT_PACKAGES instead.
To triage any build break caused by this change, temporarily opt out
this check by setting
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true in BoardConfig.mk.
Bug: 140560012
Test: build_test & verify that either PRODUCT_COPY_FILES has no ELF \
prebuilt or BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES is true
Change-Id: I9dcbe7b68c38fc23dac91fe5751cbc478105656e
diff --git a/core/Makefile b/core/Makefile
index 29a6bea..835ae5f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -40,11 +40,9 @@
)
endef
-# TODO(b/140560012): Flip BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES to default
-# false after all problematic devices are tagged.
-check_elf_prebuilt_product_copy_files :=
-ifneq (,$(filter false,$(BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES)))
check_elf_prebuilt_product_copy_files := true
+ifneq (,$(filter true,$(BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES)))
+check_elf_prebuilt_product_copy_files :=
endif
check_elf_prebuilt_product_copy_files_hint := \
found ELF prebuilt in PRODUCT_COPY_FILES, use cc_prebuilt_binary / cc_prebuilt_library_shared instead.