对于android2.3编译时候选择下面的情况,既可以对dex进行preopt优化了。
$ cat buildspec.mk
TARGET_BUILD_VARIANT:=user
TARGET_BUILD_TYPE:=release
编译相关文件:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
build/core/product_config.mk:164
# Hack to make the linux build servers use dexpreopt (emulator-based
# preoptimization). Most engineers don't use this type of target
# ("make PRODUCT-blah-user"), so this should only tend to happen when
# using buildbot.
# TODO: Remove this once host Dalvik preoptimization is working.
ifeq ($(TARGET_BUILD_VARIANT),user)
WITH_DEXPREOPT_buildbot := true
endif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
build/core/dex_preopt.mk:127
# dexpreoption for binary released jars
# ONLY enabled in custom release
ifeq ($(PARTIAL_BUILD),true)
ifeq ($(WITH_DEXPREOPT),true)
$(foreach m,$(DEXPREOPT_BINARY_RELEASE_BOOT_JARS_MODULES), \