am 64f3a191: Merge "Multilib support for odex"

* commit '64f3a191f92a6ab84a8175ad480633b8c58ac900':
  Multilib support for odex
This commit is contained in:
Brian Carlstrom 2014-05-19 16:53:35 +00:00 committed by Android Git Automerger
commit a8355ecaad
10 changed files with 178 additions and 93 deletions

View File

@ -119,7 +119,7 @@ LOCAL_RENDERSCRIPT_SKIP_INSTALL:=
LOCAL_RENDERSCRIPT_TARGET_API:=
LOCAL_BUILD_HOST_DEX:=
LOCAL_DEX_PREOPT:= # '',true,false,nostripping
LOCAL_DEX_PREOPT_IMAGE:=
LOCAL_DEX_PREOPT_IMAGE_LOCATION:=
LOCAL_PROTOC_OPTIMIZE_TYPE:= # lite(default),micro,nano,full
LOCAL_PROTOC_FLAGS:=
LOCAL_PROTO_JAVA_OUTPUT_PARAMS:=

View File

@ -530,22 +530,19 @@ TARGET_CPU_SMP ?= true
DEX2OAT_TARGET_ARCH := $(TARGET_ARCH)
DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_CPU_VARIANT)
DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
# If for a 64bit build we have a 2nd architecture but the zygote isn't 64bit,
# assume DEX2OAT should DEXPREOPT for the 2nd architecture.
ifdef TARGET_2ND_ARCH
ifeq (true,$(TARGET_IS_64_BIT))
ifeq ($(filter ro.zygote=zygote64,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES)),)
DEX2OAT_TARGET_ARCH := $(TARGET_2ND_ARCH)
DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_2ND_CPU_VARIANT)
endif
endif
endif
ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7 cortex-a15 krait denver))
DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := div
endif
ifdef TARGET_2ND_ARCH
$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH := $(TARGET_2ND_ARCH)
$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_2ND_CPU_VARIANT)
$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
ifneq (,$(filter $($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_CPU_VARIANT),cortex-a7 cortex-a15 krait denver))
$(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := div
endif
endif
# define clang/llvm tools and global flags
include $(BUILD_SYSTEM)/clang/config.mk

View File

@ -49,25 +49,26 @@ endif
include $(BUILD_SYSTEM)/dex_preopt_libart.mk
# Define dexpreopt-one-file based on current default runtime.
# $(1): the boot image to use (unused for libdvm)
# $(2): the input .jar or .apk file
# $(3): the input .jar or .apk target location (unused for libdvm)
# $(4): the output .odex file
# $(1): the input .jar or .apk file
# $(2): the output .odex file
ifeq ($(DALVIK_VM_LIB),libdvm.so)
define dexpreopt-one-file
$(call dexopt-one-file,$(2),$(4))
$(call dexopt-one-file,$(1),$(2))
endef
DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS := $(DEXOPT_DEPENDENCY)
DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $(DEXPREOPT_BOOT_ODEXS)
else
define dexpreopt-one-file
$(call dex2oat-one-file,$(1),$(2),$(3),$(4))
$(call dex2oat-one-file,$(1),$(2))
endef
DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS := $(DEX2OATD_DEPENDENCY)
DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $(DEFAULT_DEX_PREOPT_BUILT_IMAGE)
endif
DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
ifdef TARGET_2ND_ARCH
$(TARGET_2ND_ARCH_VAR_PREFIX)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
endif # TARGET_2ND_ARCH
endif # DALVIK_VM_LIB
else
$(warning No DALVIK_VM_LIB, disable dexpreopt.)
WITH_DEXPREOPT := false

View File

@ -23,20 +23,6 @@ DEX2OATD_DEPENDENCY += $(LIBARTD_COMPILER)
PRELOADED_CLASSES := frameworks/base/preloaded-classes
LIBART_BOOT_IMAGE := /$(DEXPREOPT_BOOT_JAR_DIR)/boot-$(DEX2OAT_TARGET_ARCH).art
DEFAULT_DEX_PREOPT_BUILT_IMAGE := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot-$(DEX2OAT_TARGET_ARCH).art
DEFAULT_DEX_PREOPT_INSTALLED_IMAGE :=
ifneq ($(PRODUCT_DEX_PREOPT_IMAGE_IN_DATA),true)
DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := $(PRODUCT_OUT)$(LIBART_BOOT_IMAGE)
# The rule to install boot.art and boot.oat
$(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) : $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) | $(ACP)
$(call copy-file-to-target)
$(hide) $(ACP) -fp $(patsubst %.art,%.oat,$<) $(patsubst %.art,%.oat,$@)
endif
# start of image reserved address space
LIBART_IMG_HOST_BASE_ADDRESS := 0x60000000
@ -49,48 +35,50 @@ endif
########################################################################
# The full system boot classpath
# Returns the path to the .odex file
# $(1): the arch name.
# $(2): the full path (including file name) of the corresponding .jar or .apk.
define get-odex-file-path
$(dir $(2))$(1)/$(basename $(notdir $(2))).odex
endef
# Returns the path to the image file (such as "/system/framework/<arch>/boot.art"
# $(1): the arch name (such as "arm")
# $(2): the image location (such as "/system/framework/boot.art")
define get-image-file-path
$(dir $(2))$(1)/$(notdir $(2))
endef
# note we use core-libart.jar in place of core.jar for ART.
LIBART_TARGET_BOOT_JARS := $(patsubst core, core-libart,$(DEXPREOPT_BOOT_JARS_MODULES))
LIBART_TARGET_BOOT_DEX_LOCATIONS := $(foreach jar,$(LIBART_TARGET_BOOT_JARS),/$(DEXPREOPT_BOOT_JAR_DIR)/$(jar).jar)
LIBART_TARGET_BOOT_DEX_FILES := $(foreach jar,$(LIBART_TARGET_BOOT_JARS),$(call intermediates-dir-for,JAVA_LIBRARIES,$(jar),,COMMON)/javalib.jar)
# The .oat with symbols
LIBART_TARGET_BOOT_OAT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)$(patsubst %.art,%.oat,$(LIBART_BOOT_IMAGE))
my_2nd_arch_prefix :=
include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
# Use dex2oat debug version for better error reporting
$(DEFAULT_DEX_PREOPT_BUILT_IMAGE): $(LIBART_TARGET_BOOT_DEX_FILES) $(DEX2OATD_DEPENDENCY)
@echo "target dex2oat: $@ ($?)"
@mkdir -p $(dir $@)
@mkdir -p $(dir $(LIBART_TARGET_BOOT_OAT_UNSTRIPPED))
$(hide) $(DEX2OATD) --runtime-arg -Xms256m --runtime-arg -Xmx256m --image-classes=$(PRELOADED_CLASSES) \
$(addprefix --dex-file=,$(LIBART_TARGET_BOOT_DEX_FILES)) \
$(addprefix --dex-location=,$(LIBART_TARGET_BOOT_DEX_LOCATIONS)) \
--oat-symbols=$(LIBART_TARGET_BOOT_OAT_UNSTRIPPED) \
--oat-file=$(patsubst %.art,%.oat,$@) \
--oat-location=$(patsubst %.art,%.oat,$(LIBART_BOOT_IMAGE)) \
--image=$@ --base=$(LIBART_IMG_TARGET_BASE_ADDRESS) \
--instruction-set=$(DEX2OAT_TARGET_ARCH) \
--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
--android-root=$(PRODUCT_OUT)/system
ifdef TARGET_2ND_ARCH
my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
my_2nd_arch_prefix :=
endif
########################################################################
# For a single jar or APK
# $(1): the boot image to use
# $(2): the input .jar or .apk file
# $(3): the input .jar or .apk target location
# $(4): the output .odex file
# $(1): the input .jar or .apk file
# $(2): the output .odex file
define dex2oat-one-file
$(hide) rm -f $(4)
$(hide) mkdir -p $(dir $(4))
$(hide) rm -f $(2)
$(hide) mkdir -p $(dir $(2))
$(hide) $(DEX2OATD) \
--runtime-arg -Xms64m --runtime-arg -Xmx64m \
--boot-image=$(1) \
--dex-file=$(2) \
--dex-location=$(3) \
--oat-file=$(4) \
--boot-image=$(PRIVATE_DEX_PREOPT_IMAGE_LOCATION) \
--dex-file=$(1) \
--dex-location=$(PRIVATE_DEX_LOCATION) \
--oat-file=$(2) \
--android-root=$(PRODUCT_OUT)/system \
--instruction-set=$(DEX2OAT_TARGET_ARCH) \
--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES)
--instruction-set=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) \
--instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES)
endef

View File

@ -0,0 +1,55 @@
# Rules to build boot.art
# Input variables:
# my_2nd_arch_prefix: indicates if this is to build for the 2nd arch.
# The image "location" is a symbolic path that with multiarchitecture
# support doesn't really exist on the device. Typically it is
# /system/framework/boot.art and should be the same for all supported
# architectures on the device. The concrete architecture specific
# content actually ends up in a "filename" that contains an
# architecture specific directory name such as arm, arm64, mips,
# mips64, x86, x86_64.
#
# Here are some example values for an x86_64 / x86 configuration:
#
# DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art
# DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME=out/target/product/generic_x86_64/dex_bootjars/system/framework/x86_64/boot.art
# LIBART_BOOT_IMAGE=/system/framework/x86_64/boot.art
#
# 2ND_DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art
# 2ND_DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME=out/target/product/generic_x86_64/dex_bootjars/system/framework/x86/boot.art
# 2ND_LIBART_BOOT_IMAGE=/system/framework/x86/boot.art
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot.art
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH)/boot.art
$(my_2nd_arch_prefix)LIBART_BOOT_IMAGE_FILENAME := /$(DEXPREOPT_BOOT_JAR_DIR)/$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH)/boot.art
# The .oat with symbols
$(my_2nd_arch_prefix)LIBART_TARGET_BOOT_OAT_UNSTRIPPED := $(TARGET_OUT_UNSTRIPPED)$(patsubst %.art,%.oat,$($(my_2nd_arch_prefix)LIBART_BOOT_IMAGE_FILENAME))
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE :=
ifneq ($(PRODUCT_DEX_PREOPT_IMAGE_IN_DATA),true)
$(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := $(PRODUCT_OUT)$($(my_2nd_arch_prefix)LIBART_BOOT_IMAGE_FILENAME)
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)
$(hide) $(ACP) -fp $(patsubst %.art,%.oat,$<) $(patsubst %.art,%.oat,$@)
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)
# Use dex2oat debug version for better error reporting
$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGET_BOOT_DEX_FILES) $(DEX2OATD_DEPENDENCY)
@echo "target dex2oat: $@ ($?)"
@mkdir -p $(dir $@)
@mkdir -p $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))
$(hide) $(DEX2OATD) --runtime-arg -Xms256m --runtime-arg -Xmx256m --image-classes=$(PRELOADED_CLASSES) \
$(addprefix --dex-file=,$(LIBART_TARGET_BOOT_DEX_FILES)) \
$(addprefix --dex-location=,$(LIBART_TARGET_BOOT_DEX_LOCATIONS)) \
--oat-symbols=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED) \
--oat-file=$(patsubst %.art,%.oat,$@) \
--oat-location=$(patsubst %.art,%.oat,$($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_BOOT_IMAGE_FILENAME)) \
--image=$@ --base=$(LIBART_IMG_TARGET_BASE_ADDRESS) \
--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

View File

@ -43,22 +43,86 @@ else # libdvm.so
# For libart, the boot jars' odex files are replaced by $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE).
# We use this installed_odex trick to get boot.art installed.
installed_odex := $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
# Append the odex for the 2nd arch if we have one.
installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
endif # libdvm.so
else # boot jar
ifeq ($(DALVIK_VM_LIB),libdvm.so)
built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex
ifneq ($(DALVIK_VM_LIB),libdvm.so) # libart
ifndef LOCAL_DEX_PREOPT_IMAGE
LOCAL_DEX_PREOPT_IMAGE := $(DEFAULT_DEX_PREOPT_BUILT_IMAGE)
$(built_odex) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
$(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS)
else # libart
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
# For a Java library, we build odex for both 1st arch and 2nd arch, if we have one.
# #################################################
# Odex for the 1st arch
built_odex := $(call get-odex-file-path,$(DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
else
my_dex_preopt_image_location := $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
endif
my_dex_preopt_image_filename := $(call get-image-file-path,$(DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
$(built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX :=
$(built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
$(built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
$(built_odex) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
$(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
$(my_dex_preopt_image_filename)
installed_odex := $(call get-odex-file-path,$(DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
# #################################################
# Odex for the 2nd arch
ifdef TARGET_2ND_ARCH
built_odex2 := $(call get-odex-file-path,$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
else
my_dex_preopt_image_location := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
endif
my_dex_preopt_image_filename := $(call get-image-file-path,$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
$(built_odex2): PRIVATE_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
$(built_odex2): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
$(built_odex2): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
$(built_odex2) : $($(TARGET_2ND_ARCH_VAR_PREFIX)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
$(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
$(my_dex_preopt_image_filename)
built_odex += $(built_odex2)
installed_odex += $(call get-odex-file-path,$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
endif # TARGET_2ND_ARCH
# #################################################
else # must be APPS
# For an app, we build for the multilib arch it's targeted for.
built_odex := $(call get-odex-file-path,$($(LOCAL_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
else
my_dex_preopt_image_location := $($(LOCAL_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
endif
my_dex_preopt_image_filename := $(call get-image-file-path,$($(LOCAL_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
# $(built_odex) is byproduct of $(LOCAL_BUILT_MODULE)
$(LOCAL_BUILT_MODULE) $(built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX := $(LOCAL_2ND_ARCH_VAR_PREFIX)
$(LOCAL_BUILT_MODULE) $(built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
$(LOCAL_BUILT_MODULE) $(built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
$(LOCAL_BUILT_MODULE) $(built_odex) : $($(LOCAL_2ND_ARCH_VAR_PREFIX)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
$(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
$(my_dex_preopt_image_filename)
installed_odex := $(call get-odex-file-path,$($(LOCAL_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
endif # LOCAL_MODULE_CLASS
endif # libart
endif # boot jar
ifdef built_odex
# We need $(LOCAL_BUILT_MODULE) in the deps to enforce reinstallation
# even if $(built_odex) is byproduct of $(LOCAL_BUILT_MODULE), such as in package.mk.
$(installed_odex) : $(built_odex) $(LOCAL_BUILT_MODULE) | $(ACP)
# Use pattern rule - we may have multiple installed odex files.
# Ugly syntax - See the definition get-odex-file-path.
$(installed_odex) : $(dir $(LOCAL_INSTALLED_MODULE))%/$(notdir $(word 1,$(installed_odex))) \
: $(dir $(LOCAL_BUILT_MODULE))%/$(notdir $(word 1,$(built_odex))) \
$(LOCAL_BUILT_MODULE) | $(ACP)
@echo "Install: $@"
$(copy-file-to-target)
endif

View File

@ -93,15 +93,10 @@ endif
else # ! boot jar
$(built_odex): PRIVATE_MODULE := $(LOCAL_MODULE)
$(built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
$(built_odex): PRIVATE_DEX_PREOPT_IMAGE := $(LOCAL_DEX_PREOPT_IMAGE)
# Make sure the boot jars get dex-preopt-ed first
$(built_odex) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT)
$(built_odex) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS)
$(built_odex) : $(LOCAL_DEX_PREOPT_IMAGE)
$(built_odex) : $(common_javalib.jar)
# Use pattern rule - we may have multiple built odex files.
$(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(common_javalib.jar)
@echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)"
$(call dexpreopt-one-file,$(PRIVATE_DEX_PREOPT_IMAGE),$<,$(PRIVATE_DEX_LOCATION),$@)
$(call dexpreopt-one-file,$<,$@)
$(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP)
$(call copy-file-to-target)

View File

@ -337,13 +337,7 @@ $(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CERTIFICATES := $(foreach c,\
# Define the rule to build the actual package.
$(LOCAL_BUILT_MODULE): $(AAPT) | $(ZIPALIGN)
ifdef LOCAL_DEX_PREOPT
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
$(LOCAL_BUILT_MODULE): PRIVATE_BUILT_ODEX := $(built_odex)
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_PREOPT_IMAGE := $(LOCAL_DEX_PREOPT_IMAGE)
# Make sure the boot jars get dexpreopt-ed first
$(LOCAL_BUILT_MODULE) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT)
$(LOCAL_BUILT_MODULE) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS)
$(LOCAL_BUILT_MODULE) : $(LOCAL_DEX_PREOPT_IMAGE)
# built_odex is byproduct of LOCAL_BUILT_MODULE without its own build recipe.
$(built_odex) : $(LOCAL_BUILT_MODULE)
@ -377,7 +371,7 @@ ifneq ($(extra_jar_args),)
endif
$(sign-package)
ifdef LOCAL_DEX_PREOPT
$(call dexpreopt-one-file,$(PRIVATE_DEX_PREOPT_IMAGE),$@,$(PRIVATE_DEX_LOCATION),$(PRIVATE_BUILT_ODEX))
$(call dexpreopt-one-file,$@,$(PRIVATE_BUILT_ODEX))
ifneq (nostripping,$(LOCAL_DEX_PREOPT))
$(call dexpreopt-remove-classes.dex,$@)
endif

View File

@ -163,13 +163,7 @@ LOCAL_DEX_PREOPT := false
include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
#######################################
ifdef LOCAL_DEX_PREOPT
$(built_module): PRIVATE_DEX_PREOPT_IMAGE := $(LOCAL_DEX_PREOPT_IMAGE)
$(built_module): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
$(built_module): PRIVATE_BUILT_ODEX := $(built_odex)
# Make sure the boot jars get dexpreopt-ed first
$(built_module) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT)
$(built_module) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS)
(built_module) : $(LOCAL_DEX_PREOPT_IMAGE)
# built_odex is byproduct of LOCAL_BUILT_MODULE without its own build recipe.
$(built_odex) : $(LOCAL_BUILT_MODULE)
endif # LOCAL_DEX_PREOPT
@ -180,7 +174,7 @@ ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
$(sign-package)
endif
ifdef LOCAL_DEX_PREOPT
$(call dexpreopt-one-file,$(PRIVATE_DEX_PREOPT_IMAGE),$@,$(PRIVATE_DEX_LOCATION),$(PRIVATE_BUILT_ODEX))
$(call dexpreopt-one-file,$@,$(PRIVATE_BUILT_ODEX))
endif
$(align-package)

View File

@ -37,6 +37,3 @@ TARGET_PREFER_32_BIT_APPS := true
TARGET_SUPPORTS_32_BIT_APPS := true
TARGET_SUPPORTS_64_BIT_APPS := true
# Disable DEXPREOPT until we have multilib support (bug 14694978).
WITH_DEXPREOPT := false