Build: Support for compiled-classes file

Allow a compiled-classes file for pre-opting.

Bug: 18410571
(cherry picked from commit 4fec0bb265)

Change-Id: Id54a97af606727e354b6914e46e35fdb8952aa04
This commit is contained in:
Andreas Gampe 2014-11-18 11:45:10 -08:00 committed by Jeff Hao
parent 9220b6e676
commit f318cc436a
3 changed files with 17 additions and 1 deletions

View file

@ -18,6 +18,10 @@ DEX2OATD_DEPENDENCY += $(DEX2OATD)
PRELOADED_CLASSES := frameworks/base/preloaded-classes
# 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))))
# start of image reserved address space
LIBART_IMG_HOST_BASE_ADDRESS := 0x60000000
LIBART_IMG_TARGET_BASE_ADDRESS := 0x70000000

View file

@ -37,6 +37,12 @@ ifeq (true,$(WITH_DEXPREOPT_PIC))
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 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE
--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)

View file

@ -115,4 +115,10 @@ PRODUCT_PACKAGES += \
wm
# Note: it is acceptable to not have a compiled-classes file. In that case, all boot classpath
# classes will be compiled.
PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
frameworks/base/compiled-classes:system/etc/compiled-classes)
$(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk)