blob: 298dece59fd2a06345fcf40f18ac83f4f5f7b4a0 [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
Roland Levillain38a938e2018-09-21 10:55:51 +01006// Modules listed in LOCAL_REQUIRED_MODULES for module art-runtime in art/Android.mk.
Roland Levillainffd067c2020-02-20 15:25:31 +00007// - Base requirements (binaries for which both 32- and 64-bit versions are built, if possible).
Roland Levillain38a938e2018-09-21 10:55:51 +01008art_runtime_base_binaries_both = [
9 "dalvikvm",
10]
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +010011art_runtime_base_binaries_both_on_device_first_on_host = [
12 "dex2oat",
13]
Roland Levillainffd067c2020-02-20 15:25:31 +000014// - Base requirements (binaries for which a 32-bit version is preferred on device, but for which
15// only the "first" (likely 64-bit) version is required on host).
16art_runtime_base_binaries_prefer32_on_device_first_on_host = [
Roland Levillain38a938e2018-09-21 10:55:51 +010017 "dexoptanalyzer",
18 "profman",
19]
Roland Levillainffd067c2020-02-20 15:25:31 +000020
Roland Levillain38a938e2018-09-21 10:55:51 +010021// - Base requirements (libraries).
Roland Levillain1617f8c2019-03-26 17:52:30 +000022//
23// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010024// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +000025// installed in `/system` for the ART Buildbot set-up to work properly. This is
26// done by the `standalone-apex-files` Make phony target, used by the ART
27// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
Martin Stjernholm84e5bb92019-09-05 19:56:46 +010028// you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in
Roland Levillain1617f8c2019-03-26 17:52:30 +000029// `art/Android.mk`.
30// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010031// the ART APEX.
Roland Levillain38a938e2018-09-21 10:55:51 +010032art_runtime_base_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000033 // External API (having APEX stubs).
Martin Stjernholm84bf6982019-02-05 15:07:57 +000034 "libdexfile_external",
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000035 "libnativebridge",
36 "libnativehelper",
37 "libnativeloader",
Martin Stjernholm023c2182019-03-28 15:52:32 +000038 // libadbconnection is internal and loaded with dlopen(), but it cannot use
39 // "required" because of cyclic dependency (b/124505714).
40 "libadbconnection",
41 // TODO(b/124476339): Clean up the following libraries once "required"
Martin Stjernholm0c15b822019-02-14 17:24:19 +000042 // dependencies work with APEX libraries.
Martin Stjernholm023c2182019-03-28 15:52:32 +000043 "libart",
44 "libart-compiler",
Martin Stjernholm0c15b822019-02-14 17:24:19 +000045 "libdt_fd_forward",
46 "libdt_socket",
47 "libjdwp",
48 "libnpt",
Martin Stjernholm023c2182019-03-28 15:52:32 +000049 "libopenjdkjvm",
50 "libopenjdkjvmti",
Roland Levillain38a938e2018-09-21 10:55:51 +010051]
Florian Mayer07710c52019-09-16 15:53:38 +000052
53art_runtime_base_native_device_only_shared_libs = [
54 "libperfetto_hprof",
55]
56
Jiyong Park3296fb12018-12-13 18:32:21 +090057bionic_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000058 // External API (having APEX stubs).
Jiyong Park3296fb12018-12-13 18:32:21 +090059 "libc",
60 "libm",
61 "libdl",
62]
Jiyong Park408f7d02019-04-02 23:04:42 +090063
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090064bionic_binaries_both = [
65 "linker",
66]
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010067
Roland Levillainffd067c2020-02-20 15:25:31 +000068// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which
69// only the "first" (likely 64-bit) version is required on host).
70art_runtime_debug_binaries_prefer32_on_device_first_on_host = [
Roland Levillain38a938e2018-09-21 10:55:51 +010071 "dexoptanalyzerd",
72 "profmand",
73]
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +010074art_runtime_debug_binaries_both_on_device_first_on_host = [
75 "dex2oatd",
76]
Alex Light572a0962019-01-18 14:48:37 -080077
Roland Levillaincb82d092018-11-02 18:50:15 +000078// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +010079art_runtime_debug_native_shared_libs = [
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000080 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +010081 "libartd",
82 "libartd-compiler",
Martin Stjernholm356864a2019-04-30 16:22:17 +010083 "libdexfiled_external",
Roland Levillain38a938e2018-09-21 10:55:51 +010084 "libopenjdkjvmd",
85 "libopenjdkjvmtid",
Roland Levillain38a938e2018-09-21 10:55:51 +010086]
87
Florian Mayer07710c52019-09-16 15:53:38 +000088art_runtime_base_native_device_only_debug_shared_libs = [
Elliott Hughes627d8d32019-09-30 16:46:18 -070089 "libperfetto_hprofd",
Florian Mayer07710c52019-09-16 15:53:38 +000090]
91
Roland Levillain4d6f24d2019-10-02 16:47:36 +010092// Libraries needed to execute ART run-tests.
93// TODO(b/124476339): When bug 124476339 is fixed, add these libraries as `runtime_libs`
94// dependencies of `libartd-compiler`, and remove `art_runtime_run_test_libs`.
95art_runtime_run_test_libs = [
96 "libart-disassembler",
97 "libartd-disassembler",
98]
99
Orion Hodson5cb98a92019-03-25 15:07:16 +0000100// Tools common to both device APEX and host APEX. Derived from art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +0000101art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +0100102 "dexdump",
103 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +0000104]
105
Martin Stjernholm77f17662019-04-03 17:08:21 +0100106// Tools common to both device and host debug APEXes.
107art_tools_debug_binaries = [
Roland Levillain6dd62122019-06-18 19:10:21 +0100108 "dexanalyze",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100109 "dexdiag",
Roland Levillain6dd62122019-06-18 19:10:21 +0100110 "dexlayout",
111 "dexlayoutd",
112]
113
114art_tools_debug_binaries_both = [
115 "imgdiag",
116 "imgdiagd",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100117]
118
Orion Hodson5cb98a92019-03-25 15:07:16 +0000119// Tools exclusively for the device APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000120art_tools_device_only_binaries = [
Orion Hodson267832d2020-08-27 15:13:10 +0100121 "compile_bcp.sh",
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000122 // oatdump cannot link with host linux_bionic due to not using clang lld;
123 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +0100124 "oatdump",
125]
Roland Levillain02998cf2019-03-21 14:27:02 +0000126// Same, but for only for debug packages.
127art_tools_debug_device_only_binaries = [
128 // oatdumpd cannot link with host linux_bionic due to not using clang lld;
129 // TODO: Make it work with clang lld.
130 "oatdumpd",
131]
Roland Levillain38a938e2018-09-21 10:55:51 +0100132
Orion Hodson5cb98a92019-03-25 15:07:16 +0000133// Tools exclusively for the host APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000134art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +0100135 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
136 // (same issue as for `libart_fake` above).
137 //"ahat",
138 "hprof-conv",
Roland Levillain38a938e2018-09-21 10:55:51 +0100139]
140
Roland Levillaina0b19032019-02-08 15:59:56 +0000141// Core Java libraries.
142libcore_java_libs = [
143 "core-oj",
144 "core-libart",
145 "okhttp",
146 "bouncycastle",
147 "apache-xml",
148]
149
150// Native libraries that support the core Java libraries.
Roland Levillain1617f8c2019-03-26 17:52:30 +0000151//
152// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100153// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +0000154// installed in `/system` for the ART Buildbot set-up to work properly. This is
155// done by the `standalone-apex-files` Make phony target, used by the ART
156// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
Martin Stjernholm84e5bb92019-09-05 19:56:46 +0100157// you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in
Roland Levillain1617f8c2019-03-26 17:52:30 +0000158// `art/Android.mk`.
159// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100160// the ART APEX.
Roland Levillaincb82d092018-11-02 18:50:15 +0000161libcore_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +0000162 // External API (having APEX stubs).
Pete Bentley79f56622019-03-21 17:09:56 +0000163 "libandroidio",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000164 // TODO(b/124476339): Clean up the following libraries once "required"
165 // dependencies work with APEX libraries.
Victor Chang2f0008a2019-01-15 14:10:34 +0000166 "libexpat",
Pete Bentley51ffdbe2019-01-11 15:25:40 +0000167 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +0000168 "libopenjdk",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000169]
170libcore_debug_native_shared_libs = [
171 "libopenjdkd",
Victor Chang2f0008a2019-01-15 14:10:34 +0000172]
173
Alex Lightf7f31522019-02-01 11:14:41 -0800174// Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
175art_runtime_libraries_zipapex = [
176 "libnativebridge",
177 "libnativeloader",
178 "libnativehelper",
179 "libcutils",
180]
181
Jiyong Parke9618552019-02-11 10:54:36 +0900182android_app_certificate {
Martin Stjernholm6da45692019-08-15 15:18:53 +0100183 name: "com.android.art.certificate",
184 certificate: "com.android.art",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100185}
186
187apex_key {
188 name: "com.android.art.key",
189 public_key: "com.android.art.avbpubkey",
190 private_key: "com.android.art.pem",
Jiyong Parke9618552019-02-11 10:54:36 +0900191}
192
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100193// Default values shared by device ART APEXes.
Andreas Gampee55ea982019-02-26 09:11:20 -0800194apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100195 name: "com.android.art-defaults",
Roland Levillain53058802018-11-14 17:32:18 +0000196 compile_multilib: "both",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100197 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000198 java_libs: libcore_java_libs,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700199 native_shared_libs: art_runtime_base_native_shared_libs +
Florian Mayer07710c52019-09-16 15:53:38 +0000200 art_runtime_base_native_device_only_shared_libs +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700201 libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000202 multilib: {
203 both: {
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100204 binaries: art_runtime_base_binaries_both +
205 art_runtime_base_binaries_both_on_device_first_on_host,
Roland Levillain53058802018-11-14 17:32:18 +0000206 },
207 prefer32: {
Martin Stjernholmc42db832020-02-25 16:02:07 +0000208 binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host,
Roland Levillain53058802018-11-14 17:32:18 +0000209 },
210 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700211 binaries: art_tools_common_binaries +
212 art_tools_device_only_binaries,
213 },
Roland Levillain53058802018-11-14 17:32:18 +0000214 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100215 key: "com.android.art.key",
Victor Chang64611242019-07-05 16:32:41 +0100216 required: [
Victor Chang64611242019-07-05 16:32:41 +0100217 "com.android.i18n",
218 ],
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900219 prebuilts: [
220 "art-linker-config",
221 ],
Jiyong Parke3ad70f2020-05-25 16:22:42 +0900222 // ART APEXes depend on bouncycastle which is disabled for PDK builds.
223 // Since the dependency is disabled, ART APEXes can't be built either.
224 // Disable the APEXes too. See b/157267166.
225 product_variables: {
226 pdk: {
227 enabled: false,
228 },
229 },
Andreas Gampee55ea982019-02-26 09:11:20 -0800230}
231
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100232// Default values shared by (device) Debug and Testing ART APEXes.
Roland Levillain61f07162019-06-26 12:44:04 +0100233apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100234 name: "com.android.art-dev-defaults",
235 defaults: ["com.android.art-defaults"],
Florian Mayer07710c52019-09-16 15:53:38 +0000236 native_shared_libs: art_runtime_base_native_device_only_debug_shared_libs +
Roland Levillain4d6f24d2019-10-02 16:47:36 +0100237 art_runtime_run_test_libs +
Florian Mayer07710c52019-09-16 15:53:38 +0000238 art_runtime_debug_native_shared_libs +
Roland Levillain89867bf2019-06-24 15:09:01 +0100239 libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100240 multilib: {
Roland Levillain6dd62122019-06-18 19:10:21 +0100241 both: {
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100242 binaries: art_tools_debug_binaries_both +
243 art_runtime_debug_binaries_both_on_device_first_on_host,
Roland Levillain6dd62122019-06-18 19:10:21 +0100244 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100245 prefer32: {
Martin Stjernholmc42db832020-02-25 16:02:07 +0000246 binaries: art_runtime_debug_binaries_prefer32_on_device_first_on_host,
Roland Levillain38a938e2018-09-21 10:55:51 +0100247 },
248 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700249 binaries: art_tools_debug_binaries +
250 art_tools_debug_device_only_binaries,
251 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100252 },
Roland Levillain61f07162019-06-26 12:44:04 +0100253}
254
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100255// Release version of the ART APEX module (not containing debug
Roland Levillain61f07162019-06-26 12:44:04 +0100256// variants nor tools), included in user builds. Also used for
257// storage-constrained devices in userdebug and eng builds.
Ulyana Trafimovich7a20cbd2019-11-08 11:27:31 +0000258art_apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100259 name: "com.android.art.release",
260 defaults: ["com.android.art-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100261 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100262}
263
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100264// "Debug" version of the ART APEX module (containing both release and
Roland Levillain61f07162019-06-26 12:44:04 +0100265// debug variants, as well as additional tools), included in userdebug and
266// eng build.
Ulyana Trafimovich7a20cbd2019-11-08 11:27:31 +0000267art_apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100268 name: "com.android.art.debug",
269 defaults: ["com.android.art-dev-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100270 certificate: ":com.android.art.certificate",
Roland Levillain38a938e2018-09-21 10:55:51 +0100271}
Alex Lightda948ce2018-12-06 17:05:41 +0000272
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100273// ART gtests with dependencies on internal ART APEX libraries.
Roland Levillain61f07162019-06-26 12:44:04 +0100274art_gtests = [
275 "art_cmdline_tests",
276 "art_compiler_tests",
277 "art_dex2oat_tests",
278 "art_dexanalyze_tests",
279 "art_dexdiag_tests",
280 "art_dexdump_tests",
281 "art_dexlayout_tests",
282 "art_dexlist_tests",
283 "art_dexoptanalyzer_tests",
284 "art_imgdiag_tests",
285 "art_libartbase_tests",
286 "art_libartpalette_tests",
287 "art_libdexfile_tests",
288 "art_libdexfile_support_tests",
289 "art_libprofile_tests",
290 "art_oatdump_tests",
291 "art_profman_tests",
292 "art_runtime_compiler_tests",
293 "art_runtime_tests",
294 "art_sigchain_tests",
295]
296
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100297// "Testing" version of the ART APEX module (containing both release
Roland Levillain61f07162019-06-26 12:44:04 +0100298// and debug variants, additional tools, and ART gtests), for testing
299// purposes only.
Ulyana Trafimovich7a20cbd2019-11-08 11:27:31 +0000300art_apex_test {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100301 name: "com.android.art.testing",
302 defaults: ["com.android.art-dev-defaults"],
Jooyung Han3c036882019-11-20 17:45:32 +0900303 file_contexts: ":com.android.art.debug-file_contexts",
Martin Stjernholm6da45692019-08-15 15:18:53 +0100304 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100305 tests: art_gtests,
Andreas Gampe816a5522019-09-11 11:29:49 -0700306 binaries: ["signal_dumper"], // Need signal_dumper for run-tests.
Roland Levillain61f07162019-06-26 12:44:04 +0100307}
308
309// TODO: Do this better. art_apex_test_host will disable host builds when
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100310// HOST_PREFER_32_BIT is set. We cannot simply use com.android.art.debug
Alex Lightda948ce2018-12-06 17:05:41 +0000311// because binaries have different multilib classes and 'multilib: {}' isn't
312// supported by target: { ... }.
313// See b/120617876 for more information.
Roland Levillain61f07162019-06-26 12:44:04 +0100314art_apex_test_host {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100315 name: "com.android.art.host",
Alex Lightda948ce2018-12-06 17:05:41 +0000316 compile_multilib: "both",
317 payload_type: "zip",
318 host_supported: true,
319 device_supported: false,
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100320 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000321 java_libs: libcore_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800322 ignore_system_library_special_case: true,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700323 native_shared_libs: art_runtime_base_native_shared_libs +
324 art_runtime_debug_native_shared_libs +
325 libcore_native_shared_libs +
326 libcore_debug_native_shared_libs +
327 art_runtime_libraries_zipapex +
Roland Levillain4d6f24d2019-10-02 16:47:36 +0100328 art_runtime_run_test_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000329 multilib: {
330 both: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700331 binaries: art_runtime_base_binaries_both +
Roland Levillain6dd62122019-06-18 19:10:21 +0100332 art_tools_debug_binaries_both,
Alex Lightda948ce2018-12-06 17:05:41 +0000333 },
334 first: {
Martin Stjernholmc42db832020-02-25 16:02:07 +0000335 binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host +
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100336 art_runtime_base_binaries_both_on_device_first_on_host +
Martin Stjernholmc42db832020-02-25 16:02:07 +0000337 art_runtime_debug_binaries_prefer32_on_device_first_on_host +
Nicolas Geoffrayd68580e2020-04-15 16:52:32 +0100338 art_runtime_debug_binaries_both_on_device_first_on_host +
Roland Levillainffd067c2020-02-20 15:25:31 +0000339 art_tools_common_binaries +
340 art_tools_debug_binaries + // Host APEX is always debug.
341 art_tools_host_only_binaries,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700342 },
Alex Lightda948ce2018-12-06 17:05:41 +0000343 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100344 key: "com.android.art.key",
Alex Lighte3521522018-12-06 22:51:18 -0800345 target: {
346 darwin: {
347 enabled: false,
348 },
Alex Light55a9bad2019-01-29 18:34:09 -0800349 linux_bionic: {
350 enabled: true,
351 multilib: {
352 both: {
353 native_shared_libs: bionic_native_shared_libs,
354 binaries: bionic_binaries_both,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700355 },
356 },
Alex Light55a9bad2019-01-29 18:34:09 -0800357 },
Alex Lighte3521522018-12-06 22:51:18 -0800358 },
Jiyong Parke3ad70f2020-05-25 16:22:42 +0900359 // ART APEXes depend on bouncycastle which is disabled for PDK builds.
360 // Since the dependency is disabled, ART APEXes can't be built either.
361 // Disable the APEXes too. See b/157267166.
362 product_variables: {
363 pdk: {
364 enabled: false,
365 },
366 },
Alex Lightda948ce2018-12-06 17:05:41 +0000367}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000368
369python_binary_host {
370 name: "art-apex-tester",
371 srcs: ["art_apex_test.py"],
372 main: "art_apex_test.py",
373 version: {
374 py2: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100375 enabled: true,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000376 },
377 py3: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100378 enabled: false,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000379 },
380 },
381}
382
383// Genrules so we can run the checker, and empty Java library so that it gets executed.
384
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100385art_check_apex_gen_stem = "$(location art-apex-tester)" +
386 " --debugfs $(location debugfs)" +
387 " --tmpdir $(genDir)"
388
389// The non-flattened APEXes are always checked, as they are always generated
390// (even when APEX flattening is enabled).
391genrule_defaults {
392 name: "art-check-apex-gen-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000393 tools: [
394 "art-apex-tester",
395 "debugfs",
396 ],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000397}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700398
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100399cc_defaults {
400 name: "art-check-apex-gen-fakebin-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000401 host_supported: true,
402 device_supported: false,
403 target: {
404 darwin: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700405 enabled: false, // No python3.
Jiyong Park1410e9f2019-02-02 04:18:23 +0000406 },
407 },
408}
409
410genrule {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100411 name: "art-check-release-apex-gen",
412 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100413 srcs: [":com.android.art.release"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100414 cmd: art_check_apex_gen_stem +
Roland Levillaind7ea0432019-09-09 16:29:12 +0100415 " --flavor release" +
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100416 " $(in)" +
417 " && touch $(out)",
David Srbeckyd3ee9022020-07-27 16:05:38 +0100418 out: ["art-check-release-apex-gen.unused"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100419}
420
421cc_prebuilt_binary {
422 name: "art-check-release-apex-gen-fakebin",
423 defaults: ["art-check-apex-gen-fakebin-defaults"],
424 srcs: [":art-check-release-apex-gen"],
425}
426
427genrule {
Jiyong Park1410e9f2019-02-02 04:18:23 +0000428 name: "art-check-debug-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100429 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100430 srcs: [":com.android.art.debug"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100431 cmd: art_check_apex_gen_stem +
Roland Levillaind7ea0432019-09-09 16:29:12 +0100432 " --flavor debug" +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700433 " $(in)" +
434 " && touch $(out)",
David Srbeckyd3ee9022020-07-27 16:05:38 +0100435 out: ["art-check-debug-apex-gen.unused"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000436}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700437
Jiyong Park1410e9f2019-02-02 04:18:23 +0000438cc_prebuilt_binary {
439 name: "art-check-debug-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100440 defaults: ["art-check-apex-gen-fakebin-defaults"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000441 srcs: [":art-check-debug-apex-gen"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000442}
Andreas Gampe31782c12019-02-06 09:47:25 -0800443
Roland Levillain61f07162019-06-26 12:44:04 +0100444genrule {
445 name: "art-check-testing-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100446 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100447 srcs: [":com.android.art.testing"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100448 cmd: art_check_apex_gen_stem +
Roland Levillaind7ea0432019-09-09 16:29:12 +0100449 " --flavor testing" +
Roland Levillain61f07162019-06-26 12:44:04 +0100450 " $(in)" +
451 " && touch $(out)",
David Srbeckyd3ee9022020-07-27 16:05:38 +0100452 out: ["art-check-testing-apex-gen.unused"],
Roland Levillain61f07162019-06-26 12:44:04 +0100453}
454
455cc_prebuilt_binary {
456 name: "art-check-testing-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100457 defaults: ["art-check-apex-gen-fakebin-defaults"],
Roland Levillain61f07162019-06-26 12:44:04 +0100458 srcs: [":art-check-testing-apex-gen"],
Roland Levillain61f07162019-06-26 12:44:04 +0100459}
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900460
461prebuilt_etc {
462 name: "art-linker-config",
463 src: "linker.config.txt",
464 filename: "linker.config.txt",
Kiyoung Kim56e92ec2020-09-09 16:55:24 +0900465 installable: false,
Kiyoung Kim5c2914d2020-08-14 14:34:02 +0900466}