summaryrefslogtreecommitdiffstats
path: root/core/dex_preopt_odex_install.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2015-03-09 17:17:51 -0700
committerYing Wang <wangying@google.com>2015-03-10 11:08:05 -0700
commitc7ca6173ce968c821c87df9849ffa1c4e0aabd78 (patch)
treedc8138a9ac78473c62489f03e95bcf2bd9c9b619 /core/dex_preopt_odex_install.mk
parent708b56edc879847f418108cf360bc990bb2a502a (diff)
downloadbuild-c7ca6173ce968c821c87df9849ffa1c4e0aabd78.zip
build-c7ca6173ce968c821c87df9849ffa1c4e0aabd78.tar.gz
build-c7ca6173ce968c821c87df9849ffa1c4e0aabd78.tar.bz2
Build only 64-bit odex for system server jars.
By default we build both 64-bit and 32-bit odex files for a Java library. With this change: - For system server jars (PRODUCT_SYSTEM_SERVER_JARS), we build only 64-bit odex; - A library can opt to build only 64-bit odex with "LOCAL_MULTILIB := first". Bug: 19650934 Change-Id: Ic0b7fd381396ed276e6129f883881c5c41c6e154
Diffstat (limited to 'core/dex_preopt_odex_install.mk')
-rw-r--r--core/dex_preopt_odex_install.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index aef5cd1..73c8146 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -53,7 +53,14 @@ installed_odex := $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
installed_odex += $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE)
else # boot jar
ifeq ($(LOCAL_MODULE_CLASS),JAVA_LIBRARIES)
-# For a Java library, we build odex for both 1st arch and 2nd arch, if we have one.
+# For a Java library, by default we build odex for both 1st arch and 2nd arch.
+# But it can be overridden with "LOCAL_MULTILIB := first".
+ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
+# For system server jars, we build for only "first".
+my_module_multilib := first
+else
+my_module_multilib := $(LOCAL_MULTILIB)
+endif
# #################################################
# Odex for the 1st arch
my_2nd_arch_prefix :=
@@ -61,8 +68,10 @@ include $(BUILD_SYSTEM)/setup_one_odex.mk
# #################################################
# Odex for the 2nd arch
ifdef TARGET_2ND_ARCH
+ifneq (first,$(my_module_multilib))
my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
include $(BUILD_SYSTEM)/setup_one_odex.mk
+endif # my_module_multilib is not first.
endif # TARGET_2ND_ARCH
# #################################################
else # must be APPS