2013-06-27 21:02:46 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2013 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
# Provides a functioning ART environment without Android frameworks
|
|
|
|
|
2021-01-15 17:17:36 +01:00
|
|
|
$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk)
|
|
|
|
|
2016-11-17 22:54:49 +01:00
|
|
|
# Additional mixins to the boot classpath.
|
|
|
|
PRODUCT_PACKAGES += \
|
2017-11-30 18:13:36 +01:00
|
|
|
android.test.base \
|
2016-11-17 22:54:49 +01:00
|
|
|
|
|
|
|
# Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip?
|
|
|
|
PRODUCT_PACKAGES += \
|
2014-12-08 23:46:29 +01:00
|
|
|
ext \
|
2016-11-17 22:54:49 +01:00
|
|
|
|
2019-07-05 23:39:19 +02:00
|
|
|
# Runtime (Bionic) APEX module.
|
2019-01-14 16:23:48 +01:00
|
|
|
PRODUCT_PACKAGES += com.android.runtime
|
2019-07-05 23:39:19 +02:00
|
|
|
|
|
|
|
# ART APEX module.
|
2020-12-16 03:55:18 +01:00
|
|
|
#
|
|
|
|
# Select either release (com.android.art) or debug (com.android.art.debug)
|
|
|
|
# variant of the ART APEX. By default, "user" build variants contain the release
|
|
|
|
# module, while the "eng" build variant contain the debug module. However, if
|
|
|
|
# `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is defined, it overrides the previous
|
|
|
|
# logic:
|
|
|
|
# - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `false`, the
|
|
|
|
# build will include the release module (whatever the build
|
|
|
|
# variant);
|
|
|
|
# - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `true`, the
|
|
|
|
# build will include the debug module (whatever the build variant).
|
|
|
|
#
|
|
|
|
# Note that the ART APEX package includes the minimal boot classpath JARs
|
|
|
|
# (listed in ART_APEX_JARS), which should no longer be added directly to
|
|
|
|
# PRODUCT_PACKAGES.
|
|
|
|
|
|
|
|
art_target_include_debug_build := $(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD)
|
|
|
|
ifneq (false,$(art_target_include_debug_build))
|
|
|
|
ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
|
|
|
|
art_target_include_debug_build := true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (true,$(art_target_include_debug_build))
|
|
|
|
PRODUCT_PACKAGES += com.android.art.debug
|
|
|
|
apex_test_module := art-check-debug-apex-gen-fakebin
|
|
|
|
else
|
|
|
|
PRODUCT_PACKAGES += com.android.art
|
|
|
|
apex_test_module := art-check-release-apex-gen-fakebin
|
|
|
|
endif
|
|
|
|
|
2021-11-08 21:12:45 +01:00
|
|
|
ifeq (true,$(call soong_config_get,art_module,source_build))
|
2020-12-16 03:55:18 +01:00
|
|
|
PRODUCT_HOST_PACKAGES += $(apex_test_module)
|
|
|
|
endif
|
|
|
|
|
|
|
|
art_target_include_debug_build :=
|
|
|
|
apex_test_module :=
|
2016-11-17 22:54:49 +01:00
|
|
|
|
|
|
|
# Certificates.
|
|
|
|
PRODUCT_PACKAGES += \
|
|
|
|
cacerts \
|
|
|
|
|
2018-02-20 11:56:48 +01:00
|
|
|
PRODUCT_PACKAGES += \
|
|
|
|
hiddenapi-package-whitelist.xml \
|
|
|
|
|
2021-05-13 02:24:13 +02:00
|
|
|
# The dalvik.vm.dexopt.thermal-cutoff property must contain one of the values
|
|
|
|
# listed here:
|
|
|
|
#
|
|
|
|
# https://source.android.com/devices/architecture/hidl/thermal-mitigation#thermal-api
|
|
|
|
#
|
|
|
|
# If the thermal status of the device reaches or exceeds the value set here
|
|
|
|
# background dexopt will be terminated and rescheduled using an exponential
|
|
|
|
# backoff polcy.
|
|
|
|
#
|
|
|
|
# The thermal cutoff value is currently set to THERMAL_STATUS_MODERATE.
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2015-11-05 17:49:49 +01:00
|
|
|
dalvik.vm.usejit=true \
|
2016-01-29 00:58:02 +01:00
|
|
|
dalvik.vm.usejitprofiles=true \
|
2017-02-07 04:03:05 +01:00
|
|
|
dalvik.vm.dexopt.secondary=true \
|
2021-05-13 02:24:13 +02:00
|
|
|
dalvik.vm.dexopt.thermal-cutoff=2 \
|
2016-01-29 00:58:02 +01:00
|
|
|
dalvik.vm.appimageformat=lz4
|
2017-04-25 13:25:33 +02:00
|
|
|
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2021-09-21 22:10:00 +02:00
|
|
|
ro.dalvik.vm.native.bridge?=0
|
2017-08-09 19:57:33 +02:00
|
|
|
|
2017-04-25 13:25:33 +02:00
|
|
|
# Different dexopt types for different package update/install times.
|
|
|
|
# On eng builds, make "boot" reasons only extract for faster turnaround.
|
|
|
|
ifeq (eng,$(TARGET_BUILD_VARIANT))
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2021-02-11 19:41:11 +01:00
|
|
|
pm.dexopt.first-boot?=extract \
|
2021-01-22 01:11:10 +01:00
|
|
|
pm.dexopt.boot-after-ota?=extract
|
2017-04-25 13:25:33 +02:00
|
|
|
else
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2021-01-22 01:11:10 +01:00
|
|
|
pm.dexopt.first-boot?=verify \
|
|
|
|
pm.dexopt.boot-after-ota?=verify
|
2017-04-25 13:25:33 +02:00
|
|
|
endif
|
|
|
|
|
2018-03-29 03:31:51 +02:00
|
|
|
# The install filter is speed-profile in order to enable the use of
|
|
|
|
# profiles from the dex metadata files. Note that if a profile is not provided
|
|
|
|
# or if it is empty speed-profile is equivalent to (quicken + empty app image).
|
2021-05-18 17:36:36 +02:00
|
|
|
# Note that `cmdline` is not strictly needed but it simplifies the management
|
|
|
|
# of compilation reason in the platform (as we have a unified, single path,
|
|
|
|
# without exceptions).
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2021-01-22 01:11:10 +01:00
|
|
|
pm.dexopt.post-boot?=extract \
|
2020-06-23 09:46:38 +02:00
|
|
|
pm.dexopt.install?=speed-profile \
|
2020-10-30 00:40:28 +01:00
|
|
|
pm.dexopt.install-fast?=skip \
|
|
|
|
pm.dexopt.install-bulk?=speed-profile \
|
|
|
|
pm.dexopt.install-bulk-secondary?=verify \
|
|
|
|
pm.dexopt.install-bulk-downgraded?=verify \
|
|
|
|
pm.dexopt.install-bulk-secondary-downgraded?=extract \
|
2020-06-23 09:46:38 +02:00
|
|
|
pm.dexopt.bg-dexopt?=speed-profile \
|
|
|
|
pm.dexopt.ab-ota?=speed-profile \
|
|
|
|
pm.dexopt.inactive?=verify \
|
2021-05-18 17:36:36 +02:00
|
|
|
pm.dexopt.cmdline?=verify \
|
2020-06-23 09:46:38 +02:00
|
|
|
pm.dexopt.shared?=speed
|
2017-11-03 22:37:32 +01:00
|
|
|
|
2019-01-25 18:16:28 +01:00
|
|
|
# Enable resolution of startup const strings.
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2019-01-25 18:16:28 +01:00
|
|
|
dalvik.vm.dex2oat-resolve-startup-strings=true
|
|
|
|
|
2019-04-08 22:32:06 +02:00
|
|
|
# Specify default block size of 512K to enable parallel image decompression.
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2019-04-08 22:32:06 +02:00
|
|
|
dalvik.vm.dex2oat-max-image-block-size=524288
|
|
|
|
|
2017-11-03 22:37:32 +01:00
|
|
|
# Enable minidebuginfo generation unless overridden.
|
2020-05-29 10:50:03 +02:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2019-01-08 18:02:14 +01:00
|
|
|
dalvik.vm.minidebuginfo=true \
|
2017-11-03 22:37:32 +01:00
|
|
|
dalvik.vm.dex2oat-minidebuginfo=true
|
2021-01-22 06:41:21 +01:00
|
|
|
|
|
|
|
# Two other device configs are added to IORap besides "ro.iorapd.enable".
|
|
|
|
# IORap by default is off and starts when
|
|
|
|
# (https://source.corp.google.com/android/system/iorap/iorapd.rc?q=iorapd.rc)
|
|
|
|
#
|
|
|
|
# * "ro.iorapd.enable" is true excluding unset
|
|
|
|
# * One of the device configs is true.
|
|
|
|
#
|
|
|
|
# "ro.iorapd.enable" has to be set to true, so that iorap can be started.
|
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
|
|
|
ro.iorapd.enable?=true
|
|
|
|
|
2021-03-12 22:20:09 +01:00
|
|
|
# Enable Madvising of the whole art, odex and vdex files to MADV_WILLNEED.
|
|
|
|
# The size specified here is the size limit of how much of the file
|
2021-03-18 23:21:41 +01:00
|
|
|
# (in bytes) is madvised.
|
|
|
|
# We madvise the whole .art file to MADV_WILLNEED with UINT_MAX limit.
|
|
|
|
# For odex and vdex files, we limit madvising to 100MB.
|
2021-03-12 22:20:09 +01:00
|
|
|
PRODUCT_SYSTEM_PROPERTIES += \
|
2021-03-18 23:21:41 +01:00
|
|
|
dalvik.vm.madvise.vdexfile.size=104857600 \
|
|
|
|
dalvik.vm.madvise.odexfile.size=104857600 \
|
2021-03-12 22:20:09 +01:00
|
|
|
dalvik.vm.madvise.artfile.size=4294967295
|