summaryrefslogtreecommitdiffstats
path: root/core/dex_preopt.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-05-13 13:57:28 -0700
committerBrian Carlstrom <bdc@google.com>2014-05-18 22:04:58 -0700
commitb9aa5d43de114cecdf94fabb23d3f61f147b627d (patch)
treefea4ac45cd534bf3726096381f5b3ac09c1985a8 /core/dex_preopt.mk
parent3c8089cef8eaf90b11852a5c258eba0ff5e3287e (diff)
downloadbuild-b9aa5d43de114cecdf94fabb23d3f61f147b627d.zip
build-b9aa5d43de114cecdf94fabb23d3f61f147b627d.tar.gz
build-b9aa5d43de114cecdf94fabb23d3f61f147b627d.tar.bz2
Multilib support for odex
If the VM is libart and DEXPREOPT is enabled, - For a Java library and the boot image, we build for both 1st arch and 2nd arch. - For an app, we build for the multilib arch the module is targeted for. The odex file will be in <arch_name>/<module_name>.odex inside the same dir where the jar/apk file gets installed. Nothing changed if it's built for libdvm. Bug: 14694978 Change-Id: I45118a83758b41d52d6c9e38f93f0ba2775a6c74
Diffstat (limited to 'core/dex_preopt.mk')
-rw-r--r--core/dex_preopt.mk17
1 files changed, 9 insertions, 8 deletions
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 46a6479..ab970f9 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -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