summaryrefslogtreecommitdiffstats
path: root/core/java_library.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/java_library.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/java_library.mk')
-rw-r--r--core/java_library.mk11
1 files changed, 3 insertions, 8 deletions
diff --git a/core/java_library.mk b/core/java_library.mk
index 343b27e..dffc7d9 100644
--- a/core/java_library.mk
+++ b/core/java_library.mk
@@ -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)