1# 2# Copyright (C) 2013 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17# Provides a functioning ART environment without Android frameworks 18 19$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk) 20 21# Additional mixins to the boot classpath. 22PRODUCT_PACKAGES += \ 23 android.test.base \ 24 25# Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip? 26PRODUCT_PACKAGES += \ 27 ext \ 28 29# Runtime (Bionic) APEX module. 30PRODUCT_PACKAGES += com.android.runtime 31 32# ART APEX module. 33# 34# Select either release (com.android.art) or debug (com.android.art.debug) 35# variant of the ART APEX. By default, "user" build variants contain the release 36# module, while the "eng" build variant contain the debug module. However, if 37# `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is defined, it overrides the previous 38# logic: 39# - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `false`, the 40# build will include the release module (whatever the build 41# variant); 42# - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `true`, the 43# build will include the debug module (whatever the build variant). 44# 45# Note that the ART APEX package includes the minimal boot classpath JARs 46# (listed in ART_APEX_JARS), which should no longer be added directly to 47# PRODUCT_PACKAGES. 48 49art_target_include_debug_build := $(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD) 50ifneq (false,$(art_target_include_debug_build)) 51 ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT))) 52 art_target_include_debug_build := true 53 endif 54endif 55 56ifeq (true,$(art_target_include_debug_build)) 57 PRODUCT_PACKAGES += com.android.art.debug 58 apex_test_module := art-check-debug-apex-gen-fakebin 59else 60 PRODUCT_PACKAGES += com.android.art 61 apex_test_module := art-check-release-apex-gen-fakebin 62endif 63 64ifeq (true,$(SOONG_CONFIG_art_module_source_build) 65 PRODUCT_HOST_PACKAGES += $(apex_test_module) 66endif 67 68art_target_include_debug_build := 69apex_test_module := 70 71# Certificates. 72PRODUCT_PACKAGES += \ 73 cacerts \ 74 75PRODUCT_PACKAGES += \ 76 hiddenapi-package-whitelist.xml \ 77 78# The dalvik.vm.dexopt.thermal-cutoff property must contain one of the values 79# listed here: 80# 81# https://source.android.com/devices/architecture/hidl/thermal-mitigation#thermal-api 82# 83# If the thermal status of the device reaches or exceeds the value set here 84# background dexopt will be terminated and rescheduled using an exponential 85# backoff polcy. 86# 87# The thermal cutoff value is currently set to THERMAL_STATUS_MODERATE. 88PRODUCT_SYSTEM_PROPERTIES += \ 89 dalvik.vm.usejit=true \ 90 dalvik.vm.usejitprofiles=true \ 91 dalvik.vm.dexopt.secondary=true \ 92 dalvik.vm.dexopt.thermal-cutoff=2 \ 93 dalvik.vm.appimageformat=lz4 94 95PRODUCT_SYSTEM_PROPERTIES += \ 96 ro.dalvik.vm.native.bridge=0 97 98# Different dexopt types for different package update/install times. 99# On eng builds, make "boot" reasons only extract for faster turnaround. 100ifeq (eng,$(TARGET_BUILD_VARIANT)) 101 PRODUCT_SYSTEM_PROPERTIES += \ 102 pm.dexopt.first-boot?=extract \ 103 pm.dexopt.boot-after-ota?=extract 104else 105 PRODUCT_SYSTEM_PROPERTIES += \ 106 pm.dexopt.first-boot?=verify \ 107 pm.dexopt.boot-after-ota?=verify 108endif 109 110# The install filter is speed-profile in order to enable the use of 111# profiles from the dex metadata files. Note that if a profile is not provided 112# or if it is empty speed-profile is equivalent to (quicken + empty app image). 113# Note that `cmdline` is not strictly needed but it simplifies the management 114# of compilation reason in the platform (as we have a unified, single path, 115# without exceptions). 116PRODUCT_SYSTEM_PROPERTIES += \ 117 pm.dexopt.post-boot?=extract \ 118 pm.dexopt.install?=speed-profile \ 119 pm.dexopt.install-fast?=skip \ 120 pm.dexopt.install-bulk?=speed-profile \ 121 pm.dexopt.install-bulk-secondary?=verify \ 122 pm.dexopt.install-bulk-downgraded?=verify \ 123 pm.dexopt.install-bulk-secondary-downgraded?=extract \ 124 pm.dexopt.bg-dexopt?=speed-profile \ 125 pm.dexopt.ab-ota?=speed-profile \ 126 pm.dexopt.inactive?=verify \ 127 pm.dexopt.cmdline?=verify \ 128 pm.dexopt.shared?=speed 129 130# Pass file with the list of updatable boot class path packages to dex2oat. 131PRODUCT_SYSTEM_PROPERTIES += \ 132 dalvik.vm.dex2oat-updatable-bcp-packages-file=/system/etc/updatable-bcp-packages.txt 133 134# Enable resolution of startup const strings. 135PRODUCT_SYSTEM_PROPERTIES += \ 136 dalvik.vm.dex2oat-resolve-startup-strings=true 137 138# Specify default block size of 512K to enable parallel image decompression. 139PRODUCT_SYSTEM_PROPERTIES += \ 140 dalvik.vm.dex2oat-max-image-block-size=524288 141 142# Enable minidebuginfo generation unless overridden. 143PRODUCT_SYSTEM_PROPERTIES += \ 144 dalvik.vm.minidebuginfo=true \ 145 dalvik.vm.dex2oat-minidebuginfo=true 146 147# Two other device configs are added to IORap besides "ro.iorapd.enable". 148# IORap by default is off and starts when 149# (https://source.corp.google.com/android/system/iorap/iorapd.rc?q=iorapd.rc) 150# 151# * "ro.iorapd.enable" is true excluding unset 152# * One of the device configs is true. 153# 154# "ro.iorapd.enable" has to be set to true, so that iorap can be started. 155PRODUCT_SYSTEM_PROPERTIES += \ 156 ro.iorapd.enable?=true 157 158# Enable Madvising of the whole art, odex and vdex files to MADV_WILLNEED. 159# The size specified here is the size limit of how much of the file 160# (in bytes) is madvised. 161# We madvise the whole .art file to MADV_WILLNEED with UINT_MAX limit. 162# For odex and vdex files, we limit madvising to 100MB. 163PRODUCT_SYSTEM_PROPERTIES += \ 164 dalvik.vm.madvise.vdexfile.size=104857600 \ 165 dalvik.vm.madvise.odexfile.size=104857600 \ 166 dalvik.vm.madvise.artfile.size=4294967295 167