blob: ee63757c9588e76116c2f086abf05bc71d7192fb [file] [log] [blame]
Brian Carlstrom1aeee8b2013-06-27 12:02:46 -07001#
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
Nicolas Geoffray897fe0e2021-01-15 16:17:36 +000019$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk)
20
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080021# Additional mixins to the boot classpath.
22PRODUCT_PACKAGES += \
Paul Duffina8407522017-11-30 17:13:36 +000023 android.test.base \
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080024
25# Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip?
26PRODUCT_PACKAGES += \
Ying Wangd54520a2014-12-08 14:46:29 -080027 ext \
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080028
Martin Stjernholm4cb80612019-07-05 22:39:19 +010029# Runtime (Bionic) APEX module.
Roland Levillainfbf4dbe2019-01-14 15:23:48 +000030PRODUCT_PACKAGES += com.android.runtime
Martin Stjernholm4cb80612019-07-05 22:39:19 +010031
32# ART APEX module.
Martin Stjernholmc481de02020-12-16 02:55:18 +000033#
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
Cole Faust70a886c2021-11-08 12:12:45 -080064ifeq (true,$(call soong_config_get,art_module,source_build))
Martin Stjernholmc481de02020-12-16 02:55:18 +000065 PRODUCT_HOST_PACKAGES += $(apex_test_module)
66endif
67
68art_target_include_debug_build :=
69apex_test_module :=
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080070
71# Certificates.
72PRODUCT_PACKAGES += \
73 cacerts \
74
Mathew Inwooda2a7baa2018-02-20 10:56:48 +000075PRODUCT_PACKAGES += \
76 hiddenapi-package-whitelist.xml \
77
Martin Stjernholm91964c82021-11-05 18:00:22 +000078ifeq (,$(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
Chris Wailes0c650892021-05-12 17:24:13 -070086# 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.
Jiyong Park1ea01c52020-05-29 17:50:03 +090096PRODUCT_SYSTEM_PROPERTIES += \
Nicolas Geoffray56a84e12015-11-05 16:49:49 +000097 dalvik.vm.usejit=true \
Mathieu Chartierb7a044e2016-01-28 15:58:02 -080098 dalvik.vm.usejitprofiles=true \
Calin Juravledc308c12017-02-06 19:03:05 -080099 dalvik.vm.dexopt.secondary=true \
Chris Wailes0c650892021-05-12 17:24:13 -0700100 dalvik.vm.dexopt.thermal-cutoff=2 \
Mathieu Chartierb7a044e2016-01-28 15:58:02 -0800101 dalvik.vm.appimageformat=lz4
Nicolas Geoffray10030bc2017-04-25 12:25:33 +0100102
Jiyong Park1ea01c52020-05-29 17:50:03 +0900103PRODUCT_SYSTEM_PROPERTIES += \
Lev Rumyantsevb32e1472021-09-21 13:10:00 -0700104 ro.dalvik.vm.native.bridge?=0
Lev Rumyantsevbe80acf2017-08-09 10:57:33 -0700105
Nicolas Geoffray10030bc2017-04-25 12:25:33 +0100106# 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))
Jiyong Park1ea01c52020-05-29 17:50:03 +0900109 PRODUCT_SYSTEM_PROPERTIES += \
Peter Kalauskas9255f592021-02-11 10:41:11 -0800110 pm.dexopt.first-boot?=extract \
Calin Juravleb7e744c2021-01-22 00:11:10 +0000111 pm.dexopt.boot-after-ota?=extract
Nicolas Geoffray10030bc2017-04-25 12:25:33 +0100112else
Jiyong Park1ea01c52020-05-29 17:50:03 +0900113 PRODUCT_SYSTEM_PROPERTIES += \
Calin Juravleb7e744c2021-01-22 00:11:10 +0000114 pm.dexopt.first-boot?=verify \
115 pm.dexopt.boot-after-ota?=verify
Nicolas Geoffray10030bc2017-04-25 12:25:33 +0100116endif
117
Calin Juravleb5dadc32018-03-28 18:31:51 -0700118# 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).
Calin Juravleccb4cdc2021-05-18 08:36:36 -0700121# 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).
Jiyong Park1ea01c52020-05-29 17:50:03 +0900124PRODUCT_SYSTEM_PROPERTIES += \
Calin Juravleb7e744c2021-01-22 00:11:10 +0000125 pm.dexopt.post-boot?=extract \
Jiyong Park8af29d42020-06-23 16:46:38 +0900126 pm.dexopt.install?=speed-profile \
Chris Wailesedbbf822020-10-29 16:40:28 -0700127 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 \
Jiyong Park8af29d42020-06-23 16:46:38 +0900132 pm.dexopt.bg-dexopt?=speed-profile \
133 pm.dexopt.ab-ota?=speed-profile \
134 pm.dexopt.inactive?=verify \
Calin Juravleccb4cdc2021-05-18 08:36:36 -0700135 pm.dexopt.cmdline?=verify \
Jiyong Park8af29d42020-06-23 16:46:38 +0900136 pm.dexopt.shared?=speed
Andreas Gampe0f3e16a2017-11-03 14:37:32 -0700137
Mathieu Chartiercf5a8b12019-01-25 09:16:28 -0800138# Enable resolution of startup const strings.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900139PRODUCT_SYSTEM_PROPERTIES += \
Mathieu Chartiercf5a8b12019-01-25 09:16:28 -0800140 dalvik.vm.dex2oat-resolve-startup-strings=true
141
Mathieu Chartier6cbc3892019-04-08 13:32:06 -0700142# Specify default block size of 512K to enable parallel image decompression.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900143PRODUCT_SYSTEM_PROPERTIES += \
Mathieu Chartier6cbc3892019-04-08 13:32:06 -0700144 dalvik.vm.dex2oat-max-image-block-size=524288
145
Andreas Gampe0f3e16a2017-11-03 14:37:32 -0700146# Enable minidebuginfo generation unless overridden.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900147PRODUCT_SYSTEM_PROPERTIES += \
David Srbecky99ae76e2019-01-08 17:02:14 +0000148 dalvik.vm.minidebuginfo=true \
Andreas Gampe0f3e16a2017-11-03 14:37:32 -0700149 dalvik.vm.dex2oat-minidebuginfo=true
Yan Wangaf2e8042021-01-22 05:41:21 +0000150
151# Two other device configs are added to IORap besides "ro.iorapd.enable".
152# IORap by default is off and starts when
153# (https://source.corp.google.com/android/system/iorap/iorapd.rc?q=iorapd.rc)
154#
155# * "ro.iorapd.enable" is true excluding unset
156# * One of the device configs is true.
157#
158# "ro.iorapd.enable" has to be set to true, so that iorap can be started.
159PRODUCT_SYSTEM_PROPERTIES += \
160 ro.iorapd.enable?=true
161
Jagadeesh Pakaravoorbee9f1d2021-03-12 13:20:09 -0800162# Enable Madvising of the whole art, odex and vdex files to MADV_WILLNEED.
163# The size specified here is the size limit of how much of the file
Jagadeesh Pakaravoor3a10cc52021-03-18 15:21:41 -0700164# (in bytes) is madvised.
165# We madvise the whole .art file to MADV_WILLNEED with UINT_MAX limit.
166# For odex and vdex files, we limit madvising to 100MB.
Jagadeesh Pakaravoorbee9f1d2021-03-12 13:20:09 -0800167PRODUCT_SYSTEM_PROPERTIES += \
Jagadeesh Pakaravoor3a10cc52021-03-18 15:21:41 -0700168 dalvik.vm.madvise.vdexfile.size=104857600 \
169 dalvik.vm.madvise.odexfile.size=104857600 \
Jagadeesh Pakaravoorbee9f1d2021-03-12 13:20:09 -0800170 dalvik.vm.madvise.artfile.size=4294967295