1#
2# Copyright (C) 2020 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# This file contains product config for the ART module that is common for
18# platform and unbundled builds.
19
20ifeq ($(ART_APEX_JARS),)
21  $(error ART_APEX_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable)
22endif
23
24# Order of the jars on BOOTCLASSPATH follows:
25# 1. ART APEX jars
26# 2. System jars
27# 3. System_ext jars
28# 4. Non-updatable APEX jars
29# 5. Updatable APEX jars
30#
31# ART APEX jars (1) are defined in ART_APEX_JARS. System and system_ext boot jars are defined below
32# in PRODUCT_BOOT_JARS. All other non-art APEX boot jars are part of the PRODUCT_APEX_BOOT_JARS.
33#
34# The actual runtime ordering matching above is determined by derive_classpath service at runtime.
35# See packages/modules/SdkExtensions/README.md for more details.
36
37# The order of PRODUCT_BOOT_JARS matters for runtime class lookup performance.
38PRODUCT_BOOT_JARS := \
39    $(ART_APEX_JARS)
40
41# List of jars to be included in the ART boot image for testing.
42# DO NOT reorder this list. The order must match the one described above.
43# Note: We use the host variant of "core-icu4j" and "conscrypt" for testing.
44PRODUCT_TEST_ONLY_ART_BOOT_IMAGE_JARS := \
45    $(ART_APEX_JARS) \
46    platform:core-icu4j-host \
47    platform:conscrypt-host \
48
49# /system and /system_ext boot jars.
50PRODUCT_BOOT_JARS += \
51    framework-minus-apex \
52    framework-graphics \
53    framework-location \
54    ext \
55    telephony-common \
56    voip-common \
57    ims-common
58
59# APEX boot jars. Keep the list sorted by module names and then library names.
60# Note: If the existing apex introduces the new jar, also add it to
61# PRODUCT_APEX_BOOT_JARS_FOR_SOURCE_BUILD_ONLY below.
62# Note: core-icu4j is moved back to PRODUCT_BOOT_JARS in product_config.mk at a later stage.
63# Note: For modules available in Q, DO NOT add new entries here.
64PRODUCT_APEX_BOOT_JARS := \
65    com.android.adservices:framework-adservices \
66    com.android.adservices:framework-sdksandbox \
67    com.android.appsearch:framework-appsearch \
68    com.android.btservices:framework-bluetooth \
69    com.android.configinfrastructure:framework-configinfrastructure \
70    com.android.conscrypt:conscrypt \
71    com.android.devicelock:framework-devicelock \
72    com.android.healthfitness:framework-healthfitness \
73    com.android.i18n:core-icu4j \
74    com.android.ipsec:android.net.ipsec.ike \
75    com.android.media:updatable-media \
76    com.android.mediaprovider:framework-mediaprovider \
77    com.android.mediaprovider:framework-pdf \
78    com.android.mediaprovider:framework-pdf-v \
79    com.android.ondevicepersonalization:framework-ondevicepersonalization \
80    com.android.os.statsd:framework-statsd \
81    com.android.permission:framework-permission \
82    com.android.permission:framework-permission-s \
83    com.android.scheduling:framework-scheduling \
84    com.android.sdkext:framework-sdkextensions \
85    com.android.tethering:framework-connectivity \
86    com.android.tethering:framework-connectivity-t \
87    com.android.tethering:framework-tethering \
88    com.android.uwb:framework-uwb \
89    com.android.virt:framework-virtualization \
90    com.android.wifi:framework-wifi \
91
92# When we release crashrecovery module
93ifeq ($(RELEASE_CRASHRECOVERY_MODULE),true)
94  PRODUCT_APEX_BOOT_JARS += \
95        com.android.crashrecovery:framework-crashrecovery \
96
97endif
98
99# Check if the build supports NFC apex or not
100ifeq ($(RELEASE_PACKAGE_NFC_STACK),NfcNci)
101    PRODUCT_BOOT_JARS += \
102        framework-nfc
103else
104    PRODUCT_APEX_BOOT_JARS += \
105        com.android.nfcservices:framework-nfc
106    $(call soong_config_set,bootclasspath,nfc_apex_bootclasspath_fragment,true)
107endif
108
109# Check if build supports Profiling module.
110ifeq ($(RELEASE_PACKAGE_PROFILING_MODULE),true)
111    PRODUCT_APEX_BOOT_JARS += \
112        com.android.profiling:framework-profiling \
113
114endif
115
116# List of system_server classpath jars delivered via apex.
117# Keep the list sorted by module names and then library names.
118# Note: For modules available in Q, DO NOT add new entries here.
119PRODUCT_APEX_SYSTEM_SERVER_JARS := \
120    com.android.adservices:service-adservices \
121    com.android.adservices:service-sdksandbox \
122    com.android.appsearch:service-appsearch \
123    com.android.art:service-art \
124    com.android.configinfrastructure:service-configinfrastructure \
125    com.android.healthfitness:service-healthfitness \
126    com.android.media:service-media-s \
127    com.android.ondevicepersonalization:service-ondevicepersonalization \
128    com.android.permission:service-permission \
129    com.android.rkpd:service-rkp \
130
131# When we release crashrecovery module
132ifeq ($(RELEASE_CRASHRECOVERY_MODULE),true)
133  PRODUCT_APEX_SYSTEM_SERVER_JARS += \
134        com.android.crashrecovery:service-crashrecovery \
135
136endif
137
138ifeq ($(RELEASE_AVF_ENABLE_LLPVM_CHANGES),true)
139  PRODUCT_APEX_SYSTEM_SERVER_JARS += com.android.virt:service-virtualization
140endif
141
142# Use $(wildcard) to avoid referencing the profile in thin manifests that don't have the
143# art project.
144ifneq (,$(wildcard art))
145  PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION += art/build/boot/boot-image-profile.txt
146endif
147
148# List of jars on the platform that system_server loads dynamically using separate classloaders.
149# Keep the list sorted library names.
150PRODUCT_STANDALONE_SYSTEM_SERVER_JARS := \
151
152# List of jars delivered via apex that system_server loads dynamically using separate classloaders.
153# Keep the list sorted by module names and then library names.
154# Note: For modules available in Q, DO NOT add new entries here.
155PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS := \
156    com.android.btservices:service-bluetooth \
157    com.android.devicelock:service-devicelock \
158    com.android.os.statsd:service-statsd \
159    com.android.scheduling:service-scheduling \
160    com.android.tethering:service-connectivity \
161    com.android.uwb:service-uwb \
162    com.android.wifi:service-wifi \
163
164# Check if build supports Profiling module.
165ifeq ($(RELEASE_PACKAGE_PROFILING_MODULE),true)
166    PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS += \
167        com.android.profiling:service-profiling \
168
169endif
170
171# Overrides the (apex, jar) pairs above when determining the on-device location. The format is:
172# <old_apex>:<old_jar>:<new_apex>:<new_jar>
173PRODUCT_CONFIGURED_JAR_LOCATION_OVERRIDES := \
174    platform:framework-minus-apex:platform:framework \
175    platform:core-icu4j-host:com.android.i18n:core-icu4j \
176    platform:conscrypt-host:com.android.conscrypt:conscrypt \
177
178# Minimal configuration for running dex2oat (default argument values).
179# PRODUCT_USES_DEFAULT_ART_CONFIG must be true to enable boot image compilation.
180PRODUCT_USES_DEFAULT_ART_CONFIG := true
181PRODUCT_SYSTEM_PROPERTIES += \
182    dalvik.vm.image-dex2oat-Xms=64m \
183    dalvik.vm.image-dex2oat-Xmx=64m \
184    dalvik.vm.dex2oat-Xms=64m \
185    dalvik.vm.dex2oat-Xmx=512m \
186
187PRODUCT_ENABLE_UFFD_GC := default
188