forked from openkylin/platform_build
For 64-bit, use 32-bit DEXPREOPT if zygote64 isn't enabled.
Change-Id: Ia95d74517f8182031d6044ae55559010a98ec5ca
This commit is contained in:
parent
63030fe608
commit
5d186aee8e
|
@ -493,9 +493,24 @@ ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
|
|||
TARGET_DEFAULT_JAVA_LIBRARIES := core core-junit ext framework framework2
|
||||
endif
|
||||
|
||||
# Flags for DEX2OAT
|
||||
DEX2OAT_TARGET_ARCH := $(TARGET_ARCH)
|
||||
DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_CPU_VARIANT)
|
||||
DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := default
|
||||
ifneq (,$(filter $(TARGET_CPU_VARIANT),cortex-a7 cortex-a15 krait))
|
||||
DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := div
|
||||
|
||||
# If for a 64bit build we have a 2nd architecture but the zygote isn't 64bit,
|
||||
# assume DEX2OAT should DEXPREOPT for the 2nd architecture.
|
||||
ifdef TARGET_2ND_ARCH
|
||||
ifeq (true,$(TARGET_IS_64_BIT))
|
||||
ifeq ($(filter ro.zygote=zygote64,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES)),)
|
||||
DEX2OAT_TARGET_ARCH := $(TARGET_2ND_ARCH)
|
||||
DEX2OAT_TARGET_CPU_VARIANT := $(TARGET_2ND_CPU_VARIANT)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7 cortex-a15 krait))
|
||||
DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES := div
|
||||
endif
|
||||
|
||||
# define clang/llvm tools and global flags
|
||||
|
|
|
@ -69,7 +69,8 @@ $(DEFAULT_DEX_PREOPT_BUILT_IMAGE): $(LIBART_TARGET_BOOT_DEX_FILES) $(DEX2OATD_DE
|
|||
--oat-file=$(patsubst %.art,%.oat,$@) \
|
||||
--oat-location=$(patsubst %.art,%.oat,$(LIBART_BOOT_IMAGE)) \
|
||||
--image=$@ --base=$(LIBART_IMG_TARGET_BASE_ADDRESS) \
|
||||
--instruction-set=$(TARGET_ARCH) --instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
|
||||
--instruction-set=$(DEX2OAT_TARGET_ARCH) \
|
||||
--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
|
||||
--android-root=$(PRODUCT_OUT)/system
|
||||
|
||||
|
||||
|
@ -90,6 +91,6 @@ $(hide) $(DEX2OATD) \
|
|||
--dex-location=$(3) \
|
||||
--oat-file=$(4) \
|
||||
--android-root=$(PRODUCT_OUT)/system \
|
||||
--instruction-set=$(TARGET_ARCH) \
|
||||
--instruction-set=$(DEX2OAT_TARGET_ARCH) \
|
||||
--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES)
|
||||
endef
|
||||
|
|
Loading…
Reference in New Issue