Brian Carlstrom | 1aeee8b | 2013-06-27 12:02:46 -0700 | [diff] [blame] | 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 | |
Nicolas Geoffray | 897fe0e | 2021-01-15 16:17:36 +0000 | [diff] [blame] | 19 | $(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk) |
| 20 | |
Andreas Gampe | 9a3e5ac | 2016-11-17 13:54:49 -0800 | [diff] [blame] | 21 | # Additional mixins to the boot classpath. |
| 22 | PRODUCT_PACKAGES += \ |
Paul Duffin | a840752 | 2017-11-30 17:13:36 +0000 | [diff] [blame] | 23 | android.test.base \ |
Andreas Gampe | 9a3e5ac | 2016-11-17 13:54:49 -0800 | [diff] [blame] | 24 | |
| 25 | # Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip? |
| 26 | PRODUCT_PACKAGES += \ |
Ying Wang | d54520a | 2014-12-08 14:46:29 -0800 | [diff] [blame] | 27 | ext \ |
Andreas Gampe | 9a3e5ac | 2016-11-17 13:54:49 -0800 | [diff] [blame] | 28 | |
Martin Stjernholm | 4cb8061 | 2019-07-05 22:39:19 +0100 | [diff] [blame] | 29 | # Runtime (Bionic) APEX module. |
Roland Levillain | fbf4dbe | 2019-01-14 15:23:48 +0000 | [diff] [blame] | 30 | PRODUCT_PACKAGES += com.android.runtime |
Martin Stjernholm | 4cb8061 | 2019-07-05 22:39:19 +0100 | [diff] [blame] | 31 | |
| 32 | # ART APEX module. |
Martin Stjernholm | c481de0 | 2020-12-16 02:55:18 +0000 | [diff] [blame] | 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 | |
| 49 | art_target_include_debug_build := $(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD) |
| 50 | ifneq (false,$(art_target_include_debug_build)) |
| 51 | ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT))) |
| 52 | art_target_include_debug_build := true |
| 53 | endif |
| 54 | endif |
| 55 | |
| 56 | ifeq (true,$(art_target_include_debug_build)) |
| 57 | PRODUCT_PACKAGES += com.android.art.debug |
| 58 | apex_test_module := art-check-debug-apex-gen-fakebin |
| 59 | else |
| 60 | PRODUCT_PACKAGES += com.android.art |
| 61 | apex_test_module := art-check-release-apex-gen-fakebin |
| 62 | endif |
| 63 | |
Cole Faust | 70a886c | 2021-11-08 12:12:45 -0800 | [diff] [blame] | 64 | ifeq (true,$(call soong_config_get,art_module,source_build)) |
Martin Stjernholm | c481de0 | 2020-12-16 02:55:18 +0000 | [diff] [blame] | 65 | PRODUCT_HOST_PACKAGES += $(apex_test_module) |
| 66 | endif |
| 67 | |
| 68 | art_target_include_debug_build := |
| 69 | apex_test_module := |
Andreas Gampe | 9a3e5ac | 2016-11-17 13:54:49 -0800 | [diff] [blame] | 70 | |
| 71 | # Certificates. |
| 72 | PRODUCT_PACKAGES += \ |
| 73 | cacerts \ |
| 74 | |
Mathew Inwood | a2a7baa | 2018-02-20 10:56:48 +0000 | [diff] [blame] | 75 | PRODUCT_PACKAGES += \ |
| 76 | hiddenapi-package-whitelist.xml \ |
| 77 | |
Martin Stjernholm | 91964c8 | 2021-11-05 18:00:22 +0000 | [diff] [blame] | 78 | ifeq (,$(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 |
| 84 | endif |
| 85 | |
Chris Wailes | 0c65089 | 2021-05-12 17:24:13 -0700 | [diff] [blame] | 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. |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 96 | PRODUCT_SYSTEM_PROPERTIES += \ |
Nicolas Geoffray | 56a84e1 | 2015-11-05 16:49:49 +0000 | [diff] [blame] | 97 | dalvik.vm.usejit=true \ |
Mathieu Chartier | b7a044e | 2016-01-28 15:58:02 -0800 | [diff] [blame] | 98 | dalvik.vm.usejitprofiles=true \ |
Calin Juravle | dc308c1 | 2017-02-06 19:03:05 -0800 | [diff] [blame] | 99 | dalvik.vm.dexopt.secondary=true \ |
Chris Wailes | 0c65089 | 2021-05-12 17:24:13 -0700 | [diff] [blame] | 100 | dalvik.vm.dexopt.thermal-cutoff=2 \ |
Mathieu Chartier | b7a044e | 2016-01-28 15:58:02 -0800 | [diff] [blame] | 101 | dalvik.vm.appimageformat=lz4 |
Nicolas Geoffray | 10030bc | 2017-04-25 12:25:33 +0100 | [diff] [blame] | 102 | |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 103 | PRODUCT_SYSTEM_PROPERTIES += \ |
Lev Rumyantsev | b32e147 | 2021-09-21 13:10:00 -0700 | [diff] [blame] | 104 | ro.dalvik.vm.native.bridge?=0 |
Lev Rumyantsev | be80acf | 2017-08-09 10:57:33 -0700 | [diff] [blame] | 105 | |
Nicolas Geoffray | 10030bc | 2017-04-25 12:25:33 +0100 | [diff] [blame] | 106 | # Different dexopt types for different package update/install times. |
| 107 | # On eng builds, make "boot" reasons only extract for faster turnaround. |
| 108 | ifeq (eng,$(TARGET_BUILD_VARIANT)) |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 109 | PRODUCT_SYSTEM_PROPERTIES += \ |
Peter Kalauskas | 9255f59 | 2021-02-11 10:41:11 -0800 | [diff] [blame] | 110 | pm.dexopt.first-boot?=extract \ |
Calin Juravle | b7e744c | 2021-01-22 00:11:10 +0000 | [diff] [blame] | 111 | pm.dexopt.boot-after-ota?=extract |
Nicolas Geoffray | 10030bc | 2017-04-25 12:25:33 +0100 | [diff] [blame] | 112 | else |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 113 | PRODUCT_SYSTEM_PROPERTIES += \ |
Calin Juravle | b7e744c | 2021-01-22 00:11:10 +0000 | [diff] [blame] | 114 | pm.dexopt.first-boot?=verify \ |
| 115 | pm.dexopt.boot-after-ota?=verify |
Nicolas Geoffray | 10030bc | 2017-04-25 12:25:33 +0100 | [diff] [blame] | 116 | endif |
| 117 | |
Calin Juravle | b5dadc3 | 2018-03-28 18:31:51 -0700 | [diff] [blame] | 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). |
Calin Juravle | ccb4cdc | 2021-05-18 08:36:36 -0700 | [diff] [blame] | 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). |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 124 | PRODUCT_SYSTEM_PROPERTIES += \ |
Calin Juravle | b7e744c | 2021-01-22 00:11:10 +0000 | [diff] [blame] | 125 | pm.dexopt.post-boot?=extract \ |
Jiyong Park | 8af29d4 | 2020-06-23 16:46:38 +0900 | [diff] [blame] | 126 | pm.dexopt.install?=speed-profile \ |
Chris Wailes | edbbf82 | 2020-10-29 16:40:28 -0700 | [diff] [blame] | 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 \ |
Jiyong Park | 8af29d4 | 2020-06-23 16:46:38 +0900 | [diff] [blame] | 132 | pm.dexopt.bg-dexopt?=speed-profile \ |
| 133 | pm.dexopt.ab-ota?=speed-profile \ |
| 134 | pm.dexopt.inactive?=verify \ |
Calin Juravle | ccb4cdc | 2021-05-18 08:36:36 -0700 | [diff] [blame] | 135 | pm.dexopt.cmdline?=verify \ |
Jiyong Park | 8af29d4 | 2020-06-23 16:46:38 +0900 | [diff] [blame] | 136 | pm.dexopt.shared?=speed |
Andreas Gampe | 0f3e16a | 2017-11-03 14:37:32 -0700 | [diff] [blame] | 137 | |
Mathieu Chartier | cf5a8b1 | 2019-01-25 09:16:28 -0800 | [diff] [blame] | 138 | # Enable resolution of startup const strings. |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 139 | PRODUCT_SYSTEM_PROPERTIES += \ |
Mathieu Chartier | cf5a8b1 | 2019-01-25 09:16:28 -0800 | [diff] [blame] | 140 | dalvik.vm.dex2oat-resolve-startup-strings=true |
| 141 | |
Mathieu Chartier | 6cbc389 | 2019-04-08 13:32:06 -0700 | [diff] [blame] | 142 | # Specify default block size of 512K to enable parallel image decompression. |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 143 | PRODUCT_SYSTEM_PROPERTIES += \ |
Mathieu Chartier | 6cbc389 | 2019-04-08 13:32:06 -0700 | [diff] [blame] | 144 | dalvik.vm.dex2oat-max-image-block-size=524288 |
| 145 | |
Andreas Gampe | 0f3e16a | 2017-11-03 14:37:32 -0700 | [diff] [blame] | 146 | # Enable minidebuginfo generation unless overridden. |
Jiyong Park | 1ea01c5 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 147 | PRODUCT_SYSTEM_PROPERTIES += \ |
David Srbecky | 99ae76e | 2019-01-08 17:02:14 +0000 | [diff] [blame] | 148 | dalvik.vm.minidebuginfo=true \ |
Andreas Gampe | 0f3e16a | 2017-11-03 14:37:32 -0700 | [diff] [blame] | 149 | dalvik.vm.dex2oat-minidebuginfo=true |
Yan Wang | af2e804 | 2021-01-22 05:41:21 +0000 | [diff] [blame] | 150 | |
| 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. |
| 159 | PRODUCT_SYSTEM_PROPERTIES += \ |
| 160 | ro.iorapd.enable?=true |
| 161 | |
Jagadeesh Pakaravoor | bee9f1d | 2021-03-12 13:20:09 -0800 | [diff] [blame] | 162 | # 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 Pakaravoor | 3a10cc5 | 2021-03-18 15:21:41 -0700 | [diff] [blame] | 164 | # (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 Pakaravoor | bee9f1d | 2021-03-12 13:20:09 -0800 | [diff] [blame] | 167 | PRODUCT_SYSTEM_PROPERTIES += \ |
Jagadeesh Pakaravoor | 3a10cc5 | 2021-03-18 15:21:41 -0700 | [diff] [blame] | 168 | dalvik.vm.madvise.vdexfile.size=104857600 \ |
| 169 | dalvik.vm.madvise.odexfile.size=104857600 \ |
Jagadeesh Pakaravoor | bee9f1d | 2021-03-12 13:20:09 -0800 | [diff] [blame] | 170 | dalvik.vm.madvise.artfile.size=4294967295 |