Split out minimal ART dexpreopt config and use it in mainline builds.

The config sets a few system properties that end up in command-line
arguments passed to dex2oat. Without these properties dex2oat invocation
fails, because options -Xms and -Xmx are do not have an argument.

Test: buid_mainline_modules.sh
Bug: 176171716
Change-Id: I4fd1f059aad5d48495948bfd668307de8b3d9ee1
This commit is contained in:
Nicolas Geoffray 2021-01-15 16:17:36 +00:00 committed by Ulya Trafimovich
parent 7604390e4c
commit 897fe0e8df
7 changed files with 15 additions and 11 deletions

View File

@ -14,5 +14,5 @@
# limitations under the License.
#
$(call inherit-product, build/make/target/product/bootclasspath.mk)
$(call inherit-product, build/make/target/product/default_art_config.mk)
$(call inherit-product, build/make/target/product/languages_default.mk)

View File

@ -14,6 +14,6 @@
# limitations under the License.
#
$(call inherit-product, build/make/target/product/bootclasspath.mk)
$(call inherit-product, build/make/target/product/default_art_config.mk)
$(call inherit-product, build/make/target/product/core_64_bit.mk)
$(call inherit-product, build/make/target/product/languages_default.mk)

View File

@ -14,5 +14,5 @@
# limitations under the License.
#
$(call inherit-product, build/make/target/product/bootclasspath.mk)
$(call inherit-product, build/make/target/product/default_art_config.mk)
$(call inherit-product, build/make/target/product/languages_default.mk)

View File

@ -14,6 +14,6 @@
# limitations under the License.
#
$(call inherit-product, build/make/target/product/bootclasspath.mk)
$(call inherit-product, build/make/target/product/default_art_config.mk)
$(call inherit-product, build/make/target/product/core_64_bit.mk)
$(call inherit-product, build/make/target/product/languages_default.mk)

View File

@ -400,5 +400,4 @@ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
frameworks/base/config/dirty-image-objects:system/etc/dirty-image-objects)
$(call inherit-product, $(SRC_TARGET_DIR)/product/bootclasspath.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)

View File

@ -47,3 +47,12 @@ ifneq ($(REMOVE_ATB_FROM_BCP),false)
else
PRODUCT_BOOT_JARS += android.test.base
endif
# Minimal configuration for running dex2oat (default argument values).
# PRODUCT_USES_DEFAULT_ART_CONFIG must be true to enable boot image compilation.
PRODUCT_USES_DEFAULT_ART_CONFIG := true
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.image-dex2oat-Xms=64m \
dalvik.vm.image-dex2oat-Xmx=64m \
dalvik.vm.dex2oat-Xms=64m \
dalvik.vm.dex2oat-Xmx=512m \

View File

@ -16,6 +16,8 @@
# Provides a functioning ART environment without Android frameworks
$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk)
# Additional mixins to the boot classpath.
PRODUCT_PACKAGES += \
android.test.base \
@ -41,10 +43,6 @@ PRODUCT_PACKAGES += \
hiddenapi-package-whitelist.xml \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.image-dex2oat-Xms=64m \
dalvik.vm.image-dex2oat-Xmx=64m \
dalvik.vm.dex2oat-Xms=64m \
dalvik.vm.dex2oat-Xmx=512m \
dalvik.vm.usejit=true \
dalvik.vm.usejitprofiles=true \
dalvik.vm.dexopt.secondary=true \
@ -96,5 +94,3 @@ PRODUCT_SYSTEM_PROPERTIES += \
PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.minidebuginfo=true \
dalvik.vm.dex2oat-minidebuginfo=true
PRODUCT_USES_DEFAULT_ART_CONFIG := true