blob: 29516738f3999345761d64e352d126db5411dd2b [file] [log] [blame]
Elliott Hughes627d8d32019-09-30 16:46:18 -07001// ART APEX module
2//
3// Contains both the Android Managed Runtime (ART) and the Android Core Library
4// (Libcore).
5
Bob Badour9150de62021-02-26 03:22:24 -08006package {
7 // See: http://go/android-license-faq
8 // A large-scale-change added 'default_applicable_licenses' to import
9 // all of the 'license_kinds' from "art_license"
10 // to get the below license kinds:
11 // SPDX-license-identifier-Apache-2.0
12 default_applicable_licenses: ["art_license"],
13}
14
Martin Stjernholm10bb9c52020-12-01 22:53:51 +000015soong_config_module_type_import {
16 from: "art/build/SoongConfig.bp",
17 module_types: [
18 "art_module_apex_defaults",
19 "art_module_cc_defaults",
20 "art_module_genrule_defaults",
21 ],
22}
23
Roland Levillain38a938e2018-09-21 10:55:51 +010024// Modules listed in LOCAL_REQUIRED_MODULES for module art-runtime in art/Android.mk.
Roland Levillainffd067c2020-02-20 15:25:31 +000025// - Base requirements (binaries for which both 32- and 64-bit versions are built, if possible).
Roland Levillain38a938e2018-09-21 10:55:51 +010026art_runtime_base_binaries_both = [
27 "dalvikvm",
28]
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +010029art_runtime_base_binaries_both_on_device_first_on_host = [
30 "dex2oat",
31]
Roland Levillainffd067c2020-02-20 15:25:31 +000032// - Base requirements (binaries for which a 32-bit version is preferred on device, but for which
33// only the "first" (likely 64-bit) version is required on host).
34art_runtime_base_binaries_prefer32_on_device_first_on_host = [
Roland Levillain38a938e2018-09-21 10:55:51 +010035 "dexoptanalyzer",
Orion Hodson4c3ade62021-02-10 14:07:10 +000036 "odrefresh",
Roland Levillain38a938e2018-09-21 10:55:51 +010037 "profman",
38]
Roland Levillainffd067c2020-02-20 15:25:31 +000039
Roland Levillain38a938e2018-09-21 10:55:51 +010040// - Base requirements (libraries).
Roland Levillain1617f8c2019-03-26 17:52:30 +000041//
42// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010043// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +000044// installed in `/system` for the ART Buildbot set-up to work properly. This is
45// done by the `standalone-apex-files` Make phony target, used by the ART
46// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
Martin Stjernholm84e5bb92019-09-05 19:56:46 +010047// you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in
Roland Levillain1617f8c2019-03-26 17:52:30 +000048// `art/Android.mk`.
49// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010050// the ART APEX.
Roland Levillain38a938e2018-09-21 10:55:51 +010051art_runtime_base_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000052 // External API (having APEX stubs).
Martin Stjernholm84bf6982019-02-05 15:07:57 +000053 "libdexfile_external",
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000054 "libnativebridge",
55 "libnativehelper",
56 "libnativeloader",
Nicolas Geoffrayaded1392021-03-05 09:54:10 +000057 "libsigchain",
Martin Stjernholm023c2182019-03-28 15:52:32 +000058 // libadbconnection is internal and loaded with dlopen(), but it cannot use
59 // "required" because of cyclic dependency (b/124505714).
60 "libadbconnection",
61 // TODO(b/124476339): Clean up the following libraries once "required"
Martin Stjernholm0c15b822019-02-14 17:24:19 +000062 // dependencies work with APEX libraries.
Martin Stjernholm023c2182019-03-28 15:52:32 +000063 "libart",
64 "libart-compiler",
Chris Wailesbefdad42021-01-12 16:37:57 -080065 "libartservice",
Martin Stjernholm0c15b822019-02-14 17:24:19 +000066 "libdt_fd_forward",
67 "libdt_socket",
68 "libjdwp",
69 "libnpt",
Martin Stjernholm023c2182019-03-28 15:52:32 +000070 "libopenjdkjvm",
71 "libopenjdkjvmti",
Chris Wailesbefdad42021-01-12 16:37:57 -080072 // TODO(chriswailes): Make libarttools a dependency for another target
73 // when such a target exists
74 "libarttools",
Roland Levillain38a938e2018-09-21 10:55:51 +010075]
Florian Mayer07710c52019-09-16 15:53:38 +000076
77art_runtime_base_native_device_only_shared_libs = [
78 "libperfetto_hprof",
79]
80
Jiyong Park3296fb12018-12-13 18:32:21 +090081bionic_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000082 // External API (having APEX stubs).
Jiyong Park3296fb12018-12-13 18:32:21 +090083 "libc",
84 "libm",
85 "libdl",
86]
Jiyong Park408f7d02019-04-02 23:04:42 +090087
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090088bionic_binaries_both = [
89 "linker",
90]
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010091
Roland Levillainffd067c2020-02-20 15:25:31 +000092// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which
93// only the "first" (likely 64-bit) version is required on host).
94art_runtime_debug_binaries_prefer32_on_device_first_on_host = [
Roland Levillain38a938e2018-09-21 10:55:51 +010095 "dexoptanalyzerd",
96 "profmand",
97]
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +010098art_runtime_debug_binaries_both_on_device_first_on_host = [
99 "dex2oatd",
100]
Alex Light572a0962019-01-18 14:48:37 -0800101
Roland Levillaincb82d092018-11-02 18:50:15 +0000102// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +0100103art_runtime_debug_native_shared_libs = [
Martin Stjernholmc2f8b502019-01-17 14:51:35 +0000104 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +0100105 "libartd",
106 "libartd-compiler",
Martin Stjernholm356864a2019-04-30 16:22:17 +0100107 "libdexfiled_external",
Roland Levillain38a938e2018-09-21 10:55:51 +0100108 "libopenjdkjvmd",
109 "libopenjdkjvmtid",
Roland Levillain38a938e2018-09-21 10:55:51 +0100110]
111
Florian Mayer07710c52019-09-16 15:53:38 +0000112art_runtime_base_native_device_only_debug_shared_libs = [
Elliott Hughes627d8d32019-09-30 16:46:18 -0700113 "libperfetto_hprofd",
Florian Mayer07710c52019-09-16 15:53:38 +0000114]
115
Roland Levillain4d6f24d2019-10-02 16:47:36 +0100116// Libraries needed to execute ART run-tests.
117// TODO(b/124476339): When bug 124476339 is fixed, add these libraries as `runtime_libs`
118// dependencies of `libartd-compiler`, and remove `art_runtime_run_test_libs`.
119art_runtime_run_test_libs = [
120 "libart-disassembler",
121 "libartd-disassembler",
122]
123
Orion Hodson5cb98a92019-03-25 15:07:16 +0000124// Tools common to both device APEX and host APEX. Derived from art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +0000125art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +0100126 "dexdump",
127 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +0000128]
129
Martin Stjernholm77f17662019-04-03 17:08:21 +0100130// Tools common to both device and host debug APEXes.
131art_tools_debug_binaries = [
Roland Levillain6dd62122019-06-18 19:10:21 +0100132 "dexanalyze",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100133 "dexdiag",
Roland Levillain6dd62122019-06-18 19:10:21 +0100134 "dexlayout",
135 "dexlayoutd",
136]
137
138art_tools_debug_binaries_both = [
139 "imgdiag",
140 "imgdiagd",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100141]
142
Orion Hodson5cb98a92019-03-25 15:07:16 +0000143// Tools exclusively for the device APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000144art_tools_device_only_binaries = [
145 // oatdump cannot link with host linux_bionic due to not using clang lld;
146 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +0100147 "oatdump",
148]
Roland Levillain02998cf2019-03-21 14:27:02 +0000149// Same, but for only for debug packages.
150art_tools_debug_device_only_binaries = [
151 // oatdumpd cannot link with host linux_bionic due to not using clang lld;
152 // TODO: Make it work with clang lld.
153 "oatdumpd",
154]
Roland Levillain38a938e2018-09-21 10:55:51 +0100155
Orion Hodson5cb98a92019-03-25 15:07:16 +0000156// Tools exclusively for the host APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000157art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +0100158 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
159 // (same issue as for `libart_fake` above).
160 //"ahat",
161 "hprof-conv",
Roland Levillain38a938e2018-09-21 10:55:51 +0100162]
163
Roland Levillaina0b19032019-02-08 15:59:56 +0000164// Core Java libraries.
165libcore_java_libs = [
166 "core-oj",
167 "core-libart",
168 "okhttp",
169 "bouncycastle",
170 "apache-xml",
171]
172
Chris Wailesbefdad42021-01-12 16:37:57 -0800173// ART Java libraries
174art_java_libs = [
175 "artservice",
176]
177
Roland Levillaina0b19032019-02-08 15:59:56 +0000178// Native libraries that support the core Java libraries.
Roland Levillain1617f8c2019-03-26 17:52:30 +0000179//
180// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100181// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +0000182// installed in `/system` for the ART Buildbot set-up to work properly. This is
183// done by the `standalone-apex-files` Make phony target, used by the ART
184// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
Martin Stjernholm84e5bb92019-09-05 19:56:46 +0100185// you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in
Roland Levillain1617f8c2019-03-26 17:52:30 +0000186// `art/Android.mk`.
187// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100188// the ART APEX.
Roland Levillaincb82d092018-11-02 18:50:15 +0000189libcore_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +0000190 // External API (having APEX stubs).
Pete Bentley79f56622019-03-21 17:09:56 +0000191 "libandroidio",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000192 // TODO(b/124476339): Clean up the following libraries once "required"
193 // dependencies work with APEX libraries.
Victor Chang2f0008a2019-01-15 14:10:34 +0000194 "libexpat",
Pete Bentley51ffdbe2019-01-11 15:25:40 +0000195 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +0000196 "libopenjdk",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000197]
198libcore_debug_native_shared_libs = [
199 "libopenjdkd",
Victor Chang2f0008a2019-01-15 14:10:34 +0000200]
201
Alex Lightf7f31522019-02-01 11:14:41 -0800202// Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
203art_runtime_libraries_zipapex = [
204 "libnativebridge",
205 "libnativeloader",
206 "libnativehelper",
207 "libcutils",
208]
209
Jiyong Parke9618552019-02-11 10:54:36 +0900210android_app_certificate {
Martin Stjernholm6da45692019-08-15 15:18:53 +0100211 name: "com.android.art.certificate",
212 certificate: "com.android.art",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100213}
214
215apex_key {
216 name: "com.android.art.key",
217 public_key: "com.android.art.avbpubkey",
218 private_key: "com.android.art.pem",
Jiyong Parke9618552019-02-11 10:54:36 +0900219}
220
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000221art_module_apex_defaults {
222 name: "com.android.art-defaults",
223
224 // Enable if SOONG_CONFIG_art_module_source_build is true.
Martin Stjernholm20cadbf2020-12-15 02:32:03 +0000225 enabled: false,
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000226 soong_config_variables: {
227 source_build: {
228 enabled: true,
229 },
230 },
231
232 target: {
233 windows: {
234 // When the Soong config variable above sets enabled:true, it
235 // overrides the default false for targets, so we need to disable
236 // windows explicitly.
237 enabled: false,
238 },
239 },
240}
241
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100242// Default values shared by device ART APEXes.
Andreas Gampee55ea982019-02-26 09:11:20 -0800243apex_defaults {
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000244 name: "com.android.art-device-defaults",
245 defaults: ["com.android.art-defaults"],
Roland Levillain53058802018-11-14 17:32:18 +0000246 compile_multilib: "both",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100247 manifest: "manifest-art.json",
Paul Duffin21ed6bc2021-01-26 13:19:52 +0000248 boot_images: ["art-boot-image"],
Paul Duffin3b2629b2021-03-19 15:13:21 +0000249 compat_configs: ["libcore-platform-compat-config"],
Chris Wailesbefdad42021-01-12 16:37:57 -0800250 java_libs: libcore_java_libs + art_java_libs,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700251 native_shared_libs: art_runtime_base_native_shared_libs +
Florian Mayer07710c52019-09-16 15:53:38 +0000252 art_runtime_base_native_device_only_shared_libs +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700253 libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000254 multilib: {
255 both: {
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100256 binaries: art_runtime_base_binaries_both +
257 art_runtime_base_binaries_both_on_device_first_on_host,
Roland Levillain53058802018-11-14 17:32:18 +0000258 },
259 prefer32: {
Martin Stjernholmc42db832020-02-25 16:02:07 +0000260 binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host,
Roland Levillain53058802018-11-14 17:32:18 +0000261 },
262 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700263 binaries: art_tools_common_binaries +
264 art_tools_device_only_binaries,
265 },
Roland Levillain53058802018-11-14 17:32:18 +0000266 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100267 key: "com.android.art.key",
Victor Chang64611242019-07-05 16:32:41 +0100268 required: [
Victor Chang64611242019-07-05 16:32:41 +0100269 "com.android.i18n",
270 ],
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900271 prebuilts: [
272 "art-linker-config",
273 ],
Jiyong Parke3ad70f2020-05-25 16:22:42 +0900274 // ART APEXes depend on bouncycastle which is disabled for PDK builds.
275 // Since the dependency is disabled, ART APEXes can't be built either.
276 // Disable the APEXes too. See b/157267166.
277 product_variables: {
278 pdk: {
279 enabled: false,
280 },
281 },
Nicolas Geoffrayec388c02021-03-03 22:09:06 +0000282 min_sdk_version: "S",
Andreas Gampee55ea982019-02-26 09:11:20 -0800283}
284
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100285// Default values shared by (device) Debug and Testing ART APEXes.
Roland Levillain61f07162019-06-26 12:44:04 +0100286apex_defaults {
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000287 name: "com.android.art-devel-defaults",
288 defaults: ["com.android.art-device-defaults"],
Florian Mayer07710c52019-09-16 15:53:38 +0000289 native_shared_libs: art_runtime_base_native_device_only_debug_shared_libs +
Roland Levillain4d6f24d2019-10-02 16:47:36 +0100290 art_runtime_run_test_libs +
Florian Mayer07710c52019-09-16 15:53:38 +0000291 art_runtime_debug_native_shared_libs +
Roland Levillain89867bf2019-06-24 15:09:01 +0100292 libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100293 multilib: {
Roland Levillain6dd62122019-06-18 19:10:21 +0100294 both: {
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100295 binaries: art_tools_debug_binaries_both +
296 art_runtime_debug_binaries_both_on_device_first_on_host,
Roland Levillain6dd62122019-06-18 19:10:21 +0100297 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100298 prefer32: {
Martin Stjernholmc42db832020-02-25 16:02:07 +0000299 binaries: art_runtime_debug_binaries_prefer32_on_device_first_on_host,
Roland Levillain38a938e2018-09-21 10:55:51 +0100300 },
301 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700302 binaries: art_tools_debug_binaries +
303 art_tools_debug_device_only_binaries,
304 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100305 },
Roland Levillain61f07162019-06-26 12:44:04 +0100306}
307
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100308// Release version of the ART APEX module (not containing debug
Roland Levillain61f07162019-06-26 12:44:04 +0100309// variants nor tools), included in user builds. Also used for
310// storage-constrained devices in userdebug and eng builds.
Ulyana Trafimovich7a20cbd2019-11-08 11:27:31 +0000311art_apex {
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100312 name: "com.android.art",
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000313 defaults: ["com.android.art-device-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100314 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100315}
316
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100317// "Debug" version of the ART APEX module (containing both release and
Roland Levillain61f07162019-06-26 12:44:04 +0100318// debug variants, as well as additional tools), included in userdebug and
319// eng build.
Ulyana Trafimovich7a20cbd2019-11-08 11:27:31 +0000320art_apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100321 name: "com.android.art.debug",
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000322 defaults: ["com.android.art-devel-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100323 certificate: ":com.android.art.certificate",
Roland Levillain38a938e2018-09-21 10:55:51 +0100324}
Alex Lightda948ce2018-12-06 17:05:41 +0000325
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100326// ART gtests with dependencies on internal ART APEX libraries.
Roland Levillain61f07162019-06-26 12:44:04 +0100327art_gtests = [
328 "art_cmdline_tests",
329 "art_compiler_tests",
330 "art_dex2oat_tests",
331 "art_dexanalyze_tests",
332 "art_dexdiag_tests",
333 "art_dexdump_tests",
334 "art_dexlayout_tests",
335 "art_dexlist_tests",
336 "art_dexoptanalyzer_tests",
337 "art_imgdiag_tests",
338 "art_libartbase_tests",
339 "art_libartpalette_tests",
Chris Wailesbfd622a2021-01-13 16:13:41 -0800340 "art_libartservice_tests",
341 "art_libarttools_tests",
Roland Levillain61f07162019-06-26 12:44:04 +0100342 "art_libdexfile_tests",
343 "art_libdexfile_support_tests",
344 "art_libprofile_tests",
345 "art_oatdump_tests",
Orion Hodson4c3ade62021-02-10 14:07:10 +0000346 "art_odrefresh_tests",
Roland Levillain61f07162019-06-26 12:44:04 +0100347 "art_profman_tests",
348 "art_runtime_compiler_tests",
349 "art_runtime_tests",
350 "art_sigchain_tests",
351]
352
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100353// "Testing" version of the ART APEX module (containing both release
Roland Levillain61f07162019-06-26 12:44:04 +0100354// and debug variants, additional tools, and ART gtests), for testing
355// purposes only.
Ulyana Trafimovich7a20cbd2019-11-08 11:27:31 +0000356art_apex_test {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100357 name: "com.android.art.testing",
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000358 defaults: ["com.android.art-devel-defaults"],
Jooyung Han3c036882019-11-20 17:45:32 +0900359 file_contexts: ":com.android.art.debug-file_contexts",
Martin Stjernholm6da45692019-08-15 15:18:53 +0100360 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100361 tests: art_gtests,
Andreas Gampe816a5522019-09-11 11:29:49 -0700362 binaries: ["signal_dumper"], // Need signal_dumper for run-tests.
Mathew Inwoodd2efecc2021-02-16 14:43:39 +0000363 updatable: false,
Roland Levillain61f07162019-06-26 12:44:04 +0100364}
365
366// TODO: Do this better. art_apex_test_host will disable host builds when
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100367// HOST_PREFER_32_BIT is set. We cannot simply use com.android.art.debug
Alex Lightda948ce2018-12-06 17:05:41 +0000368// because binaries have different multilib classes and 'multilib: {}' isn't
369// supported by target: { ... }.
370// See b/120617876 for more information.
Roland Levillain61f07162019-06-26 12:44:04 +0100371art_apex_test_host {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100372 name: "com.android.art.host",
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000373 defaults: ["com.android.art-defaults"],
Alex Lightda948ce2018-12-06 17:05:41 +0000374 compile_multilib: "both",
375 payload_type: "zip",
376 host_supported: true,
377 device_supported: false,
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100378 manifest: "manifest-art.json",
Mathew Inwoodd2efecc2021-02-16 14:43:39 +0000379 updatable: false,
Chris Wailesbefdad42021-01-12 16:37:57 -0800380 java_libs: libcore_java_libs + art_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800381 ignore_system_library_special_case: true,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700382 native_shared_libs: art_runtime_base_native_shared_libs +
383 art_runtime_debug_native_shared_libs +
384 libcore_native_shared_libs +
385 libcore_debug_native_shared_libs +
386 art_runtime_libraries_zipapex +
Roland Levillain4d6f24d2019-10-02 16:47:36 +0100387 art_runtime_run_test_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000388 multilib: {
389 both: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700390 binaries: art_runtime_base_binaries_both +
Roland Levillain6dd62122019-06-18 19:10:21 +0100391 art_tools_debug_binaries_both,
Alex Lightda948ce2018-12-06 17:05:41 +0000392 },
393 first: {
Martin Stjernholmc42db832020-02-25 16:02:07 +0000394 binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host +
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100395 art_runtime_base_binaries_both_on_device_first_on_host +
Martin Stjernholmc42db832020-02-25 16:02:07 +0000396 art_runtime_debug_binaries_prefer32_on_device_first_on_host +
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100397 art_runtime_debug_binaries_both_on_device_first_on_host +
Roland Levillainffd067c2020-02-20 15:25:31 +0000398 art_tools_common_binaries +
399 art_tools_debug_binaries + // Host APEX is always debug.
400 art_tools_host_only_binaries,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700401 },
Alex Lightda948ce2018-12-06 17:05:41 +0000402 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100403 key: "com.android.art.key",
Alex Lighte3521522018-12-06 22:51:18 -0800404 target: {
405 darwin: {
406 enabled: false,
407 },
Alex Light55a9bad2019-01-29 18:34:09 -0800408 linux_bionic: {
Alex Light55a9bad2019-01-29 18:34:09 -0800409 multilib: {
410 both: {
411 native_shared_libs: bionic_native_shared_libs,
412 binaries: bionic_binaries_both,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700413 },
414 },
Alex Light55a9bad2019-01-29 18:34:09 -0800415 },
Alex Lighte3521522018-12-06 22:51:18 -0800416 },
Jiyong Parke3ad70f2020-05-25 16:22:42 +0900417 // ART APEXes depend on bouncycastle which is disabled for PDK builds.
418 // Since the dependency is disabled, ART APEXes can't be built either.
419 // Disable the APEXes too. See b/157267166.
420 product_variables: {
421 pdk: {
422 enabled: false,
423 },
424 },
Alex Lightda948ce2018-12-06 17:05:41 +0000425}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000426
427python_binary_host {
428 name: "art-apex-tester",
429 srcs: ["art_apex_test.py"],
430 main: "art_apex_test.py",
431 version: {
432 py2: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100433 enabled: true,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000434 },
435 py3: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100436 enabled: false,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000437 },
438 },
439}
440
441// Genrules so we can run the checker, and empty Java library so that it gets executed.
442
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100443art_check_apex_gen_stem = "$(location art-apex-tester)" +
444 " --debugfs $(location debugfs)" +
445 " --tmpdir $(genDir)"
446
447// The non-flattened APEXes are always checked, as they are always generated
448// (even when APEX flattening is enabled).
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000449art_module_genrule_defaults {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100450 name: "art-check-apex-gen-defaults",
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000451
452 // Enable if SOONG_CONFIG_art_module_source_build is true.
Martin Stjernholm20cadbf2020-12-15 02:32:03 +0000453 enabled: false,
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000454 soong_config_variables: {
455 source_build: {
456 enabled: true,
457 },
458 },
459
Jiyong Park1410e9f2019-02-02 04:18:23 +0000460 tools: [
461 "art-apex-tester",
462 "debugfs",
463 ],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000464}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700465
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000466art_module_cc_defaults {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100467 name: "art-check-apex-gen-fakebin-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000468 host_supported: true,
469 device_supported: false,
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000470
471 // Enable if SOONG_CONFIG_art_module_source_build is true.
Martin Stjernholm20cadbf2020-12-15 02:32:03 +0000472 enabled: false,
Martin Stjernholm10bb9c52020-12-01 22:53:51 +0000473 soong_config_variables: {
474 source_build: {
475 enabled: true,
476 },
477 },
478
Jiyong Park1410e9f2019-02-02 04:18:23 +0000479 target: {
480 darwin: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700481 enabled: false, // No python3.
Jiyong Park1410e9f2019-02-02 04:18:23 +0000482 },
483 },
484}
485
486genrule {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100487 name: "art-check-release-apex-gen",
488 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100489 srcs: [":com.android.art"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100490 cmd: art_check_apex_gen_stem +
Roland Levillaind7ea0432019-09-09 16:29:12 +0100491 " --flavor release" +
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100492 " $(in)" +
Martin Stjernholm7aa2bfc2020-09-29 15:38:40 +0100493 " && touch $(out)" +
494 " && chmod a+x $(out)",
David Srbeckyd3ee9022020-07-27 16:05:38 +0100495 out: ["art-check-release-apex-gen.unused"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100496}
497
498cc_prebuilt_binary {
499 name: "art-check-release-apex-gen-fakebin",
500 defaults: ["art-check-apex-gen-fakebin-defaults"],
501 srcs: [":art-check-release-apex-gen"],
502}
503
504genrule {
Jiyong Park1410e9f2019-02-02 04:18:23 +0000505 name: "art-check-debug-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100506 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100507 srcs: [":com.android.art.debug"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100508 cmd: art_check_apex_gen_stem +
Roland Levillaind7ea0432019-09-09 16:29:12 +0100509 " --flavor debug" +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700510 " $(in)" +
Martin Stjernholm7aa2bfc2020-09-29 15:38:40 +0100511 " && touch $(out)" +
512 " && chmod a+x $(out)",
David Srbeckyd3ee9022020-07-27 16:05:38 +0100513 out: ["art-check-debug-apex-gen.unused"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000514}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700515
Jiyong Park1410e9f2019-02-02 04:18:23 +0000516cc_prebuilt_binary {
517 name: "art-check-debug-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100518 defaults: ["art-check-apex-gen-fakebin-defaults"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000519 srcs: [":art-check-debug-apex-gen"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000520}
Andreas Gampe31782c12019-02-06 09:47:25 -0800521
Roland Levillain61f07162019-06-26 12:44:04 +0100522genrule {
523 name: "art-check-testing-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100524 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100525 srcs: [":com.android.art.testing"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100526 cmd: art_check_apex_gen_stem +
Roland Levillaind7ea0432019-09-09 16:29:12 +0100527 " --flavor testing" +
Roland Levillain61f07162019-06-26 12:44:04 +0100528 " $(in)" +
Martin Stjernholm7aa2bfc2020-09-29 15:38:40 +0100529 " && touch $(out)" +
530 " && chmod a+x $(out)",
David Srbeckyd3ee9022020-07-27 16:05:38 +0100531 out: ["art-check-testing-apex-gen.unused"],
Roland Levillain61f07162019-06-26 12:44:04 +0100532}
533
534cc_prebuilt_binary {
535 name: "art-check-testing-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100536 defaults: ["art-check-apex-gen-fakebin-defaults"],
Roland Levillain61f07162019-06-26 12:44:04 +0100537 srcs: [":art-check-testing-apex-gen"],
Roland Levillain61f07162019-06-26 12:44:04 +0100538}
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900539
Kiyoung Kimbd110572020-10-06 17:45:10 +0900540linker_config {
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900541 name: "art-linker-config",
Kiyoung Kimbd110572020-10-06 17:45:10 +0900542 src: "linker.config.json",
Kiyoung Kim56e92ec2020-09-09 16:55:24 +0900543 installable: false,
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900544}