build: fix host dex2oat runtime args
The dalvik.vm.* properties are in PRODUCT_DEFAULT_PROPERTY_OVERRIDES, not PRODUCT_PROPERTY_OVERRIDES. Use $(call func,args) for user defined functions Prepend the property contents with -Xms or -Xmx when passing to dex2oat. This only worked before because DEX2OAT_XMS, etc. were blank due to the first two bugs, which resulted in --runtime-arg --runtime-arg and anything starting with -- as the argument to --runtime-arg is silently ignored. Change-Id: Ifa30038b397355171fefcc5248eea033bb634036
This commit is contained in:
parent
c4954f392e
commit
dd2ff5541e
2 changed files with 8 additions and 8 deletions
|
@ -27,14 +27,14 @@ else
|
|||
LIBART_IMG_TARGET_BASE_ADDRESS := 0x70000000
|
||||
endif
|
||||
|
||||
define get-product-property
|
||||
$(strip $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_PROPERTY_OVERRIDES))))
|
||||
define get-product-default-property
|
||||
$(strip $(patsubst $(1)=%,%,$(filter $(1)=%,$(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))))
|
||||
endef
|
||||
|
||||
DEX2OAT_IMAGE_XMS := $(get-product-property dalvik.vm.image-dex2oat-Xms)
|
||||
DEX2OAT_IMAGE_XMX := $(get-product-property dalvik.vm.image-dex2oat-Xmx)
|
||||
DEX2OAT_XMS := $(get-product-property dalvik.vm.dex2oat-Xms)
|
||||
DEX2OAT_XMX := $(get-product-property dalvik.vm.dex2oat-Xmx)
|
||||
DEX2OAT_IMAGE_XMS := $(call get-product-default-property,dalvik.vm.image-dex2oat-Xms)
|
||||
DEX2OAT_IMAGE_XMX := $(call get-product-default-property,dalvik.vm.image-dex2oat-Xmx)
|
||||
DEX2OAT_XMS := $(call get-product-default-property,dalvik.vm.dex2oat-Xms)
|
||||
DEX2OAT_XMX := $(call get-product-default-property,dalvik.vm.dex2oat-Xmx)
|
||||
|
||||
########################################################################
|
||||
# The full system boot classpath
|
||||
|
@ -77,7 +77,7 @@ define dex2oat-one-file
|
|||
$(hide) rm -f $(2)
|
||||
$(hide) mkdir -p $(dir $(2))
|
||||
$(hide) $(DEX2OATD) \
|
||||
--runtime-arg $(DEX2OAT_XMS) --runtime-arg $(DEX2OAT_XMX) \
|
||||
--runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \
|
||||
--boot-image=$(PRIVATE_DEX_PREOPT_IMAGE_LOCATION) \
|
||||
--dex-file=$(1) \
|
||||
--dex-location=$(PRIVATE_DEX_LOCATION) \
|
||||
|
|
|
@ -43,7 +43,7 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE
|
|||
@echo "target dex2oat: $@ ($?)"
|
||||
@mkdir -p $(dir $@)
|
||||
@mkdir -p $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))
|
||||
$(hide) $(DEX2OATD) --runtime-arg $(DEX2OAT_IMAGE_XMS) --runtime-arg $(DEX2OAT_IMAGE_XMX) \
|
||||
$(hide) $(DEX2OATD) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) --runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
|
||||
--image-classes=$(PRELOADED_CLASSES) \
|
||||
$(addprefix --dex-file=,$(LIBART_TARGET_BOOT_DEX_FILES)) \
|
||||
$(addprefix --dex-location=,$(LIBART_TARGET_BOOT_DEX_LOCATIONS)) \
|
||||
|
|
Loading…
Reference in a new issue