Build: Support for compiled-classes file
Allow a compiled-classes file for pre-opting.
Bug: 18410571
(cherry picked from commit 4fec0bb265ac8cdbe883b8868abfcb56713db170)
Change-Id: I8c69dd0fb8c04aaae0c4f062049cc9cce7d755c7
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index ae2c586..62ad170 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -20,6 +20,10 @@
PRELOADED_CLASSES := $(call word-colon,1,$(firstword \
$(filter %system/etc/preloaded-classes,$(PRODUCT_COPY_FILES))))
+# Use the first compiled-classes file in PRODUCT_COPY_FILES.
+COMPILED_CLASSES := $(call word-colon,1,$(firstword \
+ $(filter %system/etc/compiled-classes,$(PRODUCT_COPY_FILES))))
+
# Default to debug version to help find bugs.
# Set USE_DEX2OAT_DEBUG to false for only building non-debug versions.
ifneq ($(USE_DEX2OAT_DEBUG), false)