Build: Support for compiled-classes file

Allow a compiled-classes file for pre-opting.

Bug: 18410571
Change-Id: I8c69dd0fb8c04aaae0c4f062049cc9cce7d755c7
diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk
index 0714c73..6c6e0ad 100644
--- a/core/dex_preopt_libart_boot.mk
+++ b/core/dex_preopt_libart_boot.mk
@@ -37,6 +37,12 @@
   PRODUCT_DEX_PREOPT_BOOT_FLAGS += --compile-pic
 endif
 
+# If we have a compiled-classes file, create a parameter.
+COMPILED_CLASSES_FLAGS :=
+ifneq ($(COMPILED_CLASSES),)
+  COMPILED_CLASSES_FLAGS := --compiled-classes=$(COMPILED_CLASSES)
+endif
+
 # The rule to install boot.art and boot.oat
 $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) : $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) | $(ACP)
 	$(call copy-file-to-target)
@@ -59,4 +65,4 @@
 		--instruction-set=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) \
 		--instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
 		--android-root=$(PRODUCT_OUT)/system --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols \
-		$(PRODUCT_DEX_PREOPT_BOOT_FLAGS)
+		$(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(COMPILED_CLASSES_FLAGS)