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
19ifeq ($(TARGET_CORE_JARS),)
20$(error TARGET_CORE_JARS is empty; cannot update PRODUCT_PACKAGES variable)
21endif
22
23# Minimal boot classpath. This should be a subset of PRODUCT_BOOT_JARS, and equivalent to
24# TARGET_CORE_JARS.
25PRODUCT_PACKAGES += \
26    $(TARGET_CORE_JARS)
27
28# Additional mixins to the boot classpath.
29PRODUCT_PACKAGES += \
30    android.test.base \
31
32# Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip?
33PRODUCT_PACKAGES += \
34    ext \
35
36# Why are we pulling in expat, which is used in frameworks, only, it seem?
37PRODUCT_PACKAGES += \
38    libexpat \
39
40# Libcore.
41PRODUCT_PACKAGES += \
42    libjavacore \
43    libopenjdk \
44
45# Libcore ICU. TODO: Try to figure out if/why we need them explicitly.
46PRODUCT_PACKAGES += \
47    libicui18n \
48    libicuuc \
49
50# ART.
51PRODUCT_PACKAGES += art-runtime
52# ART/dex helpers.
53PRODUCT_PACKAGES += art-tools
54
55# Certificates.
56PRODUCT_PACKAGES += \
57    cacerts \
58
59PRODUCT_PACKAGES += \
60    hiddenapi-package-whitelist.xml \
61
62PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
63    dalvik.vm.image-dex2oat-Xms=64m \
64    dalvik.vm.image-dex2oat-Xmx=64m \
65    dalvik.vm.dex2oat-Xms=64m \
66    dalvik.vm.dex2oat-Xmx=512m \
67    dalvik.vm.usejit=true \
68    dalvik.vm.usejitprofiles=true \
69    dalvik.vm.dexopt.secondary=true \
70    dalvik.vm.appimageformat=lz4
71
72PRODUCT_PROPERTY_OVERRIDES += \
73    ro.dalvik.vm.native.bridge=0
74
75# Different dexopt types for different package update/install times.
76# On eng builds, make "boot" reasons only extract for faster turnaround.
77ifeq (eng,$(TARGET_BUILD_VARIANT))
78    PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
79        pm.dexopt.first-boot=extract \
80        pm.dexopt.boot=extract
81else
82    PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
83        pm.dexopt.first-boot=quicken \
84        pm.dexopt.boot=verify
85endif
86
87# The install filter is speed-profile in order to enable the use of
88# profiles from the dex metadata files. Note that if a profile is not provided
89# or if it is empty speed-profile is equivalent to (quicken + empty app image).
90PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
91    pm.dexopt.install=speed-profile \
92    pm.dexopt.bg-dexopt=speed-profile \
93    pm.dexopt.ab-ota=speed-profile \
94    pm.dexopt.inactive=verify \
95    pm.dexopt.shared=speed
96
97# Enable minidebuginfo generation unless overridden.
98PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
99    dalvik.vm.dex2oat-minidebuginfo=true
100