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,$(call soong_config_get,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 78ifeq (,$(TARGET_BUILD_UNBUNDLED)) 79 # Don't depend on the framework boot image profile in unbundled builds where 80 # frameworks/base may not be present. 81 # TODO(b/179900989): We may not need this check once we stop using full 82 # platform products on the thin ART manifest branch. 83 PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION += frameworks/base/boot/boot-image-profile.txt 84endif 85 86# The dalvik.vm.dexopt.thermal-cutoff property must contain one of the values 87# listed here: 88# 89# https://source.android.com/devices/architecture/hidl/thermal-mitigation#thermal-api 90# 91# If the thermal status of the device reaches or exceeds the value set here 92# background dexopt will be terminated and rescheduled using an exponential 93# backoff polcy. 94# 95# The thermal cutoff value is currently set to THERMAL_STATUS_MODERATE. 96PRODUCT_SYSTEM_PROPERTIES += \ 97 dalvik.vm.usejit=true \ 98 dalvik.vm.usejitprofiles=true \ 99 dalvik.vm.dexopt.secondary=true \ 100 dalvik.vm.dexopt.thermal-cutoff=2 \ 101 dalvik.vm.appimageformat=lz4 102 103PRODUCT_SYSTEM_PROPERTIES += \ 104 ro.dalvik.vm.native.bridge?=0 105 106# Different dexopt types for different package update/install times. 107# On eng builds, make "boot" reasons only extract for faster turnaround. 108ifeq (eng,$(TARGET_BUILD_VARIANT)) 109 PRODUCT_SYSTEM_PROPERTIES += \ 110 pm.dexopt.first-boot?=extract \ 111 pm.dexopt.boot-after-ota?=extract 112else 113 PRODUCT_SYSTEM_PROPERTIES += \ 114 pm.dexopt.first-boot?=verify \ 115 pm.dexopt.boot-after-ota?=verify 116endif 117 118# The install filter is speed-profile in order to enable the use of 119# profiles from the dex metadata files. Note that if a profile is not provided 120# or if it is empty speed-profile is equivalent to (quicken + empty app image). 121# Note that `cmdline` is not strictly needed but it simplifies the management 122# of compilation reason in the platform (as we have a unified, single path, 123# without exceptions). 124PRODUCT_SYSTEM_PROPERTIES += \ 125 pm.dexopt.post-boot?=extract \ 126 pm.dexopt.install?=speed-profile \ 127 pm.dexopt.install-fast?=skip \ 128 pm.dexopt.install-bulk?=speed-profile \ 129 pm.dexopt.install-bulk-secondary?=verify \ 130 pm.dexopt.install-bulk-downgraded?=verify \ 131 pm.dexopt.install-bulk-secondary-downgraded?=extract \ 132 pm.dexopt.bg-dexopt?=speed-profile \ 133 pm.dexopt.ab-ota?=speed-profile \ 134 pm.dexopt.inactive?=verify \ 135 pm.dexopt.cmdline?=verify \ 136 pm.dexopt.shared?=speed 137 138# Enable resolution of startup const strings. 139PRODUCT_SYSTEM_PROPERTIES += \ 140 dalvik.vm.dex2oat-resolve-startup-strings=true 141 142# Specify default block size of 512K to enable parallel image decompression. 143PRODUCT_SYSTEM_PROPERTIES += \ 144 dalvik.vm.dex2oat-max-image-block-size=524288 145 146# Enable minidebuginfo generation unless overridden. 147PRODUCT_SYSTEM_PROPERTIES += \ 148 dalvik.vm.minidebuginfo=true \ 149 dalvik.vm.dex2oat-minidebuginfo=true 150 151# Enable Madvising of the whole art, odex and vdex files to MADV_WILLNEED. 152# The size specified here is the size limit of how much of the file 153# (in bytes) is madvised. 154# We madvise the whole .art file to MADV_WILLNEED with UINT_MAX limit. 155# For odex and vdex files, we limit madvising to 100MB. 156PRODUCT_SYSTEM_PROPERTIES += \ 157 dalvik.vm.madvise.vdexfile.size=104857600 \ 158 dalvik.vm.madvise.odexfile.size=104857600 \ 159 dalvik.vm.madvise.artfile.size=4294967295 160