summaryrefslogtreecommitdiffstats
path: root/core/dex_preopt.mk
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2010-09-29 11:54:15 -0700
committerDan Bornstein <danfuzz@android.com>2010-09-29 11:54:15 -0700
commitc8c09e285d59f73334267deb9502c0927c616837 (patch)
treec977a603dada7620d5eecb44f6e4158c2c03b606 /core/dex_preopt.mk
parentea83daa389aea493294617232b5c34414861d701 (diff)
downloadbuild-c8c09e285d59f73334267deb9502c0927c616837.zip
build-c8c09e285d59f73334267deb9502c0927c616837.tar.gz
build-c8c09e285d59f73334267deb9502c0927c616837.tar.bz2
Inform dex-preopt when the target device is a uniprocessor.
By default, dex-preopt optimizes for an SMP target. Change-Id: Ib92552e55f5426b9b035ce862233752af090bb43
Diffstat (limited to 'core/dex_preopt.mk')
-rw-r--r--core/dex_preopt.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index b036443..0e151bd 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -17,6 +17,14 @@ DEXPREOPT_BOOT_JAR_DIR_FULL_PATH := $(DEXPREOPT_BUILD_DIR)/$(DEXPREOPT_PRODUCT_D
DEXPREOPT_BOOT_ODEXS := $(foreach b,$(DEXPREOPT_BOOT_JARS_MODULES),\
$(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(b).odex)
+# If the target is a uniprocessor, then explicitly tell the preoptimizer
+# that fact. (By default, it always optimizes for an SMP target.)
+ifeq ($(TARGET_CPU_SMP),true)
+DEXPREOPT_UNIPROCESSOR :=
+else
+DEXPREOPT_UNIPROCESSOR := --uniprocessor
+endif
+
# $(1): the .jar or .apk to remove classes.dex
define dexpreopt-remove-classes.dex
$(hide) $(AAPT) remove $(1) classes.dex
@@ -27,7 +35,7 @@ endef
define dexpreopt-one-file
$(hide) $(DEXPREOPT) --dexopt=$(DEXPREOPT_DEXOPT) --build-dir=$(DEXPREOPT_BUILD_DIR) \
--product-dir=$(DEXPREOPT_PRODUCT_DIR) --boot-dir=$(DEXPREOPT_BOOT_JAR_DIR) \
- --boot-jars=$(DEXPREOPT_BOOT_JARS) \
+ --boot-jars=$(DEXPREOPT_BOOT_JARS) $(DEXPREOPT_UNIPROCESSOR) \
$(patsubst $(DEXPREOPT_BUILD_DIR)/%,%,$(1)) \
$(patsubst $(DEXPREOPT_BUILD_DIR)/%,%,$(2))
endef