diff options
author | Andreas Gampe <agampe@google.com> | 2014-11-18 23:00:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-18 23:00:10 +0000 |
commit | b457d0ea33b1e6d93bc4a09cda43d6e74b3d1687 (patch) | |
tree | 38864a18d207ecaf38dff5d41f4b94d14c985550 | |
parent | ff62239b026fb2635ffc6bdd3f0ad79d0fab2ee7 (diff) | |
parent | 4fec0bb265ac8cdbe883b8868abfcb56713db170 (diff) | |
download | build-b457d0ea33b1e6d93bc4a09cda43d6e74b3d1687.zip build-b457d0ea33b1e6d93bc4a09cda43d6e74b3d1687.tar.gz build-b457d0ea33b1e6d93bc4a09cda43d6e74b3d1687.tar.bz2 |
am 4fec0bb2: Build: Support for compiled-classes file
* commit '4fec0bb265ac8cdbe883b8868abfcb56713db170':
Build: Support for compiled-classes file
-rw-r--r-- | core/dex_preopt_libart.mk | 4 | ||||
-rw-r--r-- | core/dex_preopt_libart_boot.mk | 8 | ||||
-rw-r--r-- | target/product/base.mk | 5 |
3 files changed, 16 insertions, 1 deletions
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index 811062a..cfbf221 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -20,6 +20,10 @@ DEX2OATD_DEPENDENCY += $(DEX2OATD) 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)))) + # start of image reserved address space LIBART_IMG_HOST_BASE_ADDRESS := 0x60000000 LIBART_IMG_TARGET_BASE_ADDRESS := 0x70000000 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 @@ 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) diff --git a/target/product/base.mk b/target/product/base.mk index 6387fda..0d052b5 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -118,5 +118,10 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES := $(call add-to-product-copy-files-if-exists,\ frameworks/base/preloaded-classes:system/etc/preloaded-classes) +# 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) |