blob: 284cc18dc885400db78f7a70647b0a277ac66cd3 [file] [log] [blame]
Roland Levillain38a938e2018-09-21 10:55:51 +01001// Modules listed in LOCAL_REQUIRED_MODULES for module art-runtime in art/Android.mk.
2// - Base requirements (binaries for which both 32- and 64-bit versions are built, if relevant).
3art_runtime_base_binaries_both = [
4 "dalvikvm",
5]
6// - Base requirements (binaries for which a 32-bit version is preferred).
7art_runtime_base_binaries_prefer32 = [
8 "dex2oat",
9 "dexoptanalyzer",
10 "profman",
11]
12// - Base requirements (libraries).
Roland Levillain1617f8c2019-03-26 17:52:30 +000013//
14// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010015// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +000016// installed in `/system` for the ART Buildbot set-up to work properly. This is
17// done by the `standalone-apex-files` Make phony target, used by the ART
18// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
Martin Stjernholm84e5bb92019-09-05 19:56:46 +010019// you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in
Roland Levillain1617f8c2019-03-26 17:52:30 +000020// `art/Android.mk`.
21// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010022// the ART APEX.
Roland Levillain38a938e2018-09-21 10:55:51 +010023art_runtime_base_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000024 // External API (having APEX stubs).
Martin Stjernholm84bf6982019-02-05 15:07:57 +000025 "libdexfile_external",
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000026 "libnativebridge",
27 "libnativehelper",
28 "libnativeloader",
Martin Stjernholm023c2182019-03-28 15:52:32 +000029 // libadbconnection is internal and loaded with dlopen(), but it cannot use
30 // "required" because of cyclic dependency (b/124505714).
31 "libadbconnection",
32 // TODO(b/124476339): Clean up the following libraries once "required"
Martin Stjernholm0c15b822019-02-14 17:24:19 +000033 // dependencies work with APEX libraries.
Martin Stjernholm023c2182019-03-28 15:52:32 +000034 "libart",
35 "libart-compiler",
Martin Stjernholm0c15b822019-02-14 17:24:19 +000036 "libdt_fd_forward",
37 "libdt_socket",
38 "libjdwp",
39 "libnpt",
Martin Stjernholm023c2182019-03-28 15:52:32 +000040 "libopenjdkjvm",
41 "libopenjdkjvmti",
Roland Levillain38a938e2018-09-21 10:55:51 +010042]
Florian Mayer07710c52019-09-16 15:53:38 +000043
44art_runtime_base_native_device_only_shared_libs = [
45 "libperfetto_hprof",
46]
47
Jiyong Park3296fb12018-12-13 18:32:21 +090048bionic_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000049 // External API (having APEX stubs).
Jiyong Park3296fb12018-12-13 18:32:21 +090050 "libc",
51 "libm",
52 "libdl",
53]
Jiyong Park408f7d02019-04-02 23:04:42 +090054
Roland Levillain89867bf2019-06-24 15:09:01 +010055bionic_native_device_only_shared_libs = [
Jiyong Park408f7d02019-04-02 23:04:42 +090056 // ... and their internal dependencies
57 // These are available only on device
58 "libc_malloc_debug",
59 "libc_malloc_hooks",
60]
61
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090062bionic_binaries_both = [
63 "linker",
64]
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010065
Roland Levillain38a938e2018-09-21 10:55:51 +010066// - Debug variants (binaries for which a 32-bit version is preferred).
Roland Levillain38a938e2018-09-21 10:55:51 +010067art_runtime_debug_binaries_prefer32 = [
Roland Levillain38a938e2018-09-21 10:55:51 +010068 "dexoptanalyzerd",
69 "profmand",
70]
Alex Light572a0962019-01-18 14:48:37 -080071art_runtime_debug_binaries_prefer32_device = [
72 "dex2oatd",
73]
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010074
Alex Light572a0962019-01-18 14:48:37 -080075art_runtime_debug_binaries_both_host = [
76 "dex2oatd",
77]
78
Roland Levillaincb82d092018-11-02 18:50:15 +000079// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +010080art_runtime_debug_native_shared_libs = [
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000081 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +010082 "libartd",
83 "libartd-compiler",
Martin Stjernholm356864a2019-04-30 16:22:17 +010084 "libdexfiled_external",
Roland Levillain38a938e2018-09-21 10:55:51 +010085 "libopenjdkjvmd",
86 "libopenjdkjvmtid",
Roland Levillain38a938e2018-09-21 10:55:51 +010087]
88
Florian Mayer07710c52019-09-16 15:53:38 +000089art_runtime_base_native_device_only_debug_shared_libs = [
90 "libperfetto_hprofd",
91]
92
Orion Hodson5cb98a92019-03-25 15:07:16 +000093// Tools common to both device APEX and host APEX. Derived from art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000094art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010095 "dexdump",
96 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000097]
98
Martin Stjernholm77f17662019-04-03 17:08:21 +010099// Tools common to both device and host debug APEXes.
100art_tools_debug_binaries = [
Roland Levillain6dd62122019-06-18 19:10:21 +0100101 "dexanalyze",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100102 "dexdiag",
Roland Levillain6dd62122019-06-18 19:10:21 +0100103 "dexlayout",
104 "dexlayoutd",
105]
106
107art_tools_debug_binaries_both = [
108 "imgdiag",
109 "imgdiagd",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100110]
111
Orion Hodson5cb98a92019-03-25 15:07:16 +0000112// Tools exclusively for the device APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000113art_tools_device_only_binaries = [
114 // oatdump cannot link with host linux_bionic due to not using clang lld;
115 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +0100116 "oatdump",
117]
Roland Levillain02998cf2019-03-21 14:27:02 +0000118// Same, but for only for debug packages.
119art_tools_debug_device_only_binaries = [
120 // oatdumpd cannot link with host linux_bionic due to not using clang lld;
121 // TODO: Make it work with clang lld.
122 "oatdumpd",
123]
Roland Levillain38a938e2018-09-21 10:55:51 +0100124
Orion Hodson5cb98a92019-03-25 15:07:16 +0000125// Tools exclusively for the host APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000126art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +0100127 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
128 // (same issue as for `libart_fake` above).
129 //"ahat",
130 "hprof-conv",
Roland Levillain38a938e2018-09-21 10:55:51 +0100131]
132
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100133// Libraries needed to use com.android.art.host for zipapex run-tests
Alex Light6585ecb2019-02-08 14:13:22 -0800134art_runtime_host_run_test_libs = [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700135 "libartd-disassembler",
Alex Light6585ecb2019-02-08 14:13:22 -0800136]
137
Roland Levillaina0b19032019-02-08 15:59:56 +0000138// Core Java libraries.
139libcore_java_libs = [
140 "core-oj",
141 "core-libart",
Victor Chang759845f2019-08-06 16:04:36 +0100142 "core-icu4j",
Roland Levillaina0b19032019-02-08 15:59:56 +0000143 "okhttp",
144 "bouncycastle",
145 "apache-xml",
146]
147
148// Native libraries that support the core Java libraries.
Roland Levillain1617f8c2019-03-26 17:52:30 +0000149//
150// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100151// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +0000152// installed in `/system` for the ART Buildbot set-up to work properly. This is
153// done by the `standalone-apex-files` Make phony target, used by the ART
154// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
Martin Stjernholm84e5bb92019-09-05 19:56:46 +0100155// you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in
Roland Levillain1617f8c2019-03-26 17:52:30 +0000156// `art/Android.mk`.
157// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100158// the ART APEX.
Roland Levillaincb82d092018-11-02 18:50:15 +0000159libcore_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +0000160 // External API (having APEX stubs).
Victor Chang2f0008a2019-01-15 14:10:34 +0000161 "libandroidicu",
Pete Bentley79f56622019-03-21 17:09:56 +0000162 "libandroidio",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000163 // TODO(b/124476339): Clean up the following libraries once "required"
164 // dependencies work with APEX libraries.
Victor Chang2f0008a2019-01-15 14:10:34 +0000165 "libexpat",
166 "libicui18n",
167 "libicuuc",
Pete Bentley51ffdbe2019-01-11 15:25:40 +0000168 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +0000169 "libopenjdk",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000170]
171libcore_debug_native_shared_libs = [
172 "libopenjdkd",
Victor Chang2f0008a2019-01-15 14:10:34 +0000173]
174
Martin Stjernholm023c2182019-03-28 15:52:32 +0000175libcore_native_device_only_shared_libs = [
Victor Chang2f0008a2019-01-15 14:10:34 +0000176 // TODO(b/122876336): Remove libpac.so once it's migrated to Webview.
177 // libpac is used by frameworks, not by ART host.
178 "libpac",
Roland Levillaincb82d092018-11-02 18:50:15 +0000179]
180
Alex Lightf7f31522019-02-01 11:14:41 -0800181// Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
182art_runtime_libraries_zipapex = [
183 "libnativebridge",
184 "libnativeloader",
185 "libnativehelper",
186 "libcutils",
187]
188
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100189// Runtime (Bionic) APEX module
190//
191// This used to consist of Bionic, ART and Libcore. Now it contains Bionic only,
192// but keeps /apex/com.android.runtime for app compat reasons.
193//
194// TODO(b/139176024): Move this to the Bionic tree.
195
196android_app_certificate {
197 name: "com.android.runtime.certificate",
198 certificate: "com.android.runtime",
199}
200
Roland Levillain38a938e2018-09-21 10:55:51 +0100201apex_key {
202 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +0900203 public_key: "com.android.runtime.avbpubkey",
204 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +0100205}
206
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100207prebuilt_etc {
208 name: "com.android.runtime.ld.config.txt",
209 src: "runtime-ld.config.txt",
210 filename: "ld.config.txt",
211 installable: false,
212}
213
214apex {
215 name: "com.android.runtime",
216 compile_multilib: "both",
217 manifest: "manifest-runtime.json",
218 native_shared_libs: bionic_native_shared_libs +
219 bionic_native_device_only_shared_libs,
220 multilib: {
221 both: {
222 binaries: bionic_binaries_both,
223 },
224 },
225 prebuilts: ["com.android.runtime.ld.config.txt"],
226 key: "com.android.runtime.key",
227 certificate: ":com.android.runtime.certificate",
228}
229
230// ART APEX module
231//
232// Contains both the Android Managed Runtime (ART) and the Android Core Library
233// (Libcore).
234
Jiyong Parke9618552019-02-11 10:54:36 +0900235android_app_certificate {
Martin Stjernholm6da45692019-08-15 15:18:53 +0100236 name: "com.android.art.certificate",
237 certificate: "com.android.art",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100238}
239
240apex_key {
241 name: "com.android.art.key",
242 public_key: "com.android.art.avbpubkey",
243 private_key: "com.android.art.pem",
Jiyong Parke9618552019-02-11 10:54:36 +0900244}
245
Roland Levillain3be7afe2018-12-04 19:35:03 +0000246prebuilt_etc {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100247 name: "com.android.art.ld.config.txt",
Roland Levillain3be7afe2018-12-04 19:35:03 +0000248 src: "ld.config.txt",
249 filename: "ld.config.txt",
250 installable: false,
251}
252
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100253// Default values shared by device ART APEXes.
Andreas Gampee55ea982019-02-26 09:11:20 -0800254apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100255 name: "com.android.art-defaults",
Roland Levillain53058802018-11-14 17:32:18 +0000256 compile_multilib: "both",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100257 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000258 java_libs: libcore_java_libs,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700259 native_shared_libs: art_runtime_base_native_shared_libs +
Florian Mayer07710c52019-09-16 15:53:38 +0000260 art_runtime_base_native_device_only_shared_libs +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700261 libcore_native_device_only_shared_libs +
262 libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000263 multilib: {
264 both: {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100265 binaries: art_runtime_base_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000266 },
267 prefer32: {
268 binaries: art_runtime_base_binaries_prefer32,
269 },
270 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700271 binaries: art_tools_common_binaries +
272 art_tools_device_only_binaries,
273 },
Roland Levillain53058802018-11-14 17:32:18 +0000274 },
Andreas Gampe31782c12019-02-06 09:47:25 -0800275 binaries: [
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800276 "art_postinstall_hook",
Andreas Gampe31782c12019-02-06 09:47:25 -0800277 "art_preinstall_hook",
278 "art_preinstall_hook_boot",
Andreas Gampe29c111e2019-02-28 13:58:07 -0800279 "art_preinstall_hook_system_server",
Andreas Gampe31782c12019-02-06 09:47:25 -0800280 "art_prepostinstall_utils",
281 ],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100282 prebuilts: ["com.android.art.ld.config.txt"],
283 key: "com.android.art.key",
Victor Chang64611242019-07-05 16:32:41 +0100284 required: [
285 "art_apex_boot_integrity",
286 "com.android.i18n",
287 ],
Andreas Gampee55ea982019-02-26 09:11:20 -0800288}
289
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100290// Default values shared by (device) Debug and Testing ART APEXes.
Roland Levillain61f07162019-06-26 12:44:04 +0100291apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100292 name: "com.android.art-dev-defaults",
293 defaults: ["com.android.art-defaults"],
Florian Mayer07710c52019-09-16 15:53:38 +0000294 native_shared_libs: art_runtime_base_native_device_only_debug_shared_libs +
295 art_runtime_debug_native_shared_libs +
Roland Levillain89867bf2019-06-24 15:09:01 +0100296 libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100297 multilib: {
Roland Levillain6dd62122019-06-18 19:10:21 +0100298 both: {
299 binaries: art_tools_debug_binaries_both,
300 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100301 prefer32: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700302 binaries: art_runtime_debug_binaries_prefer32 +
303 art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100304 },
305 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700306 binaries: art_tools_debug_binaries +
307 art_tools_debug_device_only_binaries,
308 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100309 },
Roland Levillain61f07162019-06-26 12:44:04 +0100310}
311
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100312// Release version of the ART APEX module (not containing debug
Roland Levillain61f07162019-06-26 12:44:04 +0100313// variants nor tools), included in user builds. Also used for
314// storage-constrained devices in userdebug and eng builds.
315apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100316 name: "com.android.art.release",
317 defaults: ["com.android.art-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100318 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100319}
320
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100321// "Debug" version of the ART APEX module (containing both release and
Roland Levillain61f07162019-06-26 12:44:04 +0100322// debug variants, as well as additional tools), included in userdebug and
323// eng build.
324apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100325 name: "com.android.art.debug",
326 defaults: ["com.android.art-dev-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100327 certificate: ":com.android.art.certificate",
Roland Levillain38a938e2018-09-21 10:55:51 +0100328}
Alex Lightda948ce2018-12-06 17:05:41 +0000329
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100330// ART gtests with dependencies on internal ART APEX libraries.
Roland Levillain61f07162019-06-26 12:44:04 +0100331art_gtests = [
332 "art_cmdline_tests",
333 "art_compiler_tests",
334 "art_dex2oat_tests",
335 "art_dexanalyze_tests",
336 "art_dexdiag_tests",
337 "art_dexdump_tests",
338 "art_dexlayout_tests",
339 "art_dexlist_tests",
340 "art_dexoptanalyzer_tests",
341 "art_imgdiag_tests",
342 "art_libartbase_tests",
343 "art_libartpalette_tests",
344 "art_libdexfile_tests",
345 "art_libdexfile_support_tests",
346 "art_libprofile_tests",
347 "art_oatdump_tests",
348 "art_profman_tests",
349 "art_runtime_compiler_tests",
350 "art_runtime_tests",
351 "art_sigchain_tests",
352]
353
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100354// "Testing" version of the ART APEX module (containing both release
Roland Levillain61f07162019-06-26 12:44:04 +0100355// and debug variants, additional tools, and ART gtests), for testing
356// purposes only.
357apex_test {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100358 name: "com.android.art.testing",
359 defaults: ["com.android.art-dev-defaults"],
360 file_contexts: "com.android.art.debug",
Martin Stjernholm6da45692019-08-15 15:18:53 +0100361 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100362 tests: art_gtests,
Andreas Gampe816a5522019-09-11 11:29:49 -0700363 binaries: ["signal_dumper"], // Need signal_dumper for run-tests.
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",
Alex Lightda948ce2018-12-06 17:05:41 +0000373 compile_multilib: "both",
374 payload_type: "zip",
375 host_supported: true,
376 device_supported: false,
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100377 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000378 java_libs: libcore_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800379 ignore_system_library_special_case: true,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700380 native_shared_libs: art_runtime_base_native_shared_libs +
381 art_runtime_debug_native_shared_libs +
382 libcore_native_shared_libs +
383 libcore_debug_native_shared_libs +
384 art_runtime_libraries_zipapex +
385 art_runtime_host_run_test_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000386 multilib: {
387 both: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700388 binaries: art_runtime_base_binaries_both +
Roland Levillain6dd62122019-06-18 19:10:21 +0100389 art_runtime_debug_binaries_both_host +
390 art_tools_debug_binaries_both,
Alex Lightda948ce2018-12-06 17:05:41 +0000391 },
392 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700393 binaries: art_tools_common_binaries + // Host APEX is always debug.
394 art_tools_debug_binaries +
395 art_tools_host_only_binaries +
396 art_runtime_base_binaries_prefer32 +
397 art_runtime_debug_binaries_prefer32,
398 },
Alex Lightda948ce2018-12-06 17:05:41 +0000399 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100400 key: "com.android.art.key",
Alex Lighte3521522018-12-06 22:51:18 -0800401 target: {
402 darwin: {
403 enabled: false,
404 },
Alex Light55a9bad2019-01-29 18:34:09 -0800405 linux_bionic: {
406 enabled: true,
407 multilib: {
408 both: {
409 native_shared_libs: bionic_native_shared_libs,
410 binaries: bionic_binaries_both,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700411 },
412 },
Alex Light55a9bad2019-01-29 18:34:09 -0800413 },
Alex Lighte3521522018-12-06 22:51:18 -0800414 },
Alex Lightda948ce2018-12-06 17:05:41 +0000415}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000416
417python_binary_host {
418 name: "art-apex-tester",
419 srcs: ["art_apex_test.py"],
420 main: "art_apex_test.py",
421 version: {
422 py2: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100423 enabled: true,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000424 },
425 py3: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100426 enabled: false,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000427 },
428 },
429}
430
431// Genrules so we can run the checker, and empty Java library so that it gets executed.
432
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100433art_check_apex_gen_stem = "$(location art-apex-tester)" +
434 " --debugfs $(location debugfs)" +
435 " --tmpdir $(genDir)"
436
437// The non-flattened APEXes are always checked, as they are always generated
438// (even when APEX flattening is enabled).
439genrule_defaults {
440 name: "art-check-apex-gen-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000441 tools: [
442 "art-apex-tester",
443 "debugfs",
444 ],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000445}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700446
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100447cc_defaults {
448 name: "art-check-apex-gen-fakebin-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000449 host_supported: true,
450 device_supported: false,
451 target: {
452 darwin: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700453 enabled: false, // No python3.
Jiyong Park1410e9f2019-02-02 04:18:23 +0000454 },
455 },
456}
457
458genrule {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100459 name: "art-check-release-apex-gen",
460 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100461 srcs: [":com.android.art.release"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100462 cmd: art_check_apex_gen_stem +
463 " $(in)" +
464 " && touch $(out)",
465 out: ["art-check-release-apex-gen.dummy"],
466}
467
468cc_prebuilt_binary {
469 name: "art-check-release-apex-gen-fakebin",
470 defaults: ["art-check-apex-gen-fakebin-defaults"],
471 srcs: [":art-check-release-apex-gen"],
472}
473
474genrule {
Jiyong Park1410e9f2019-02-02 04:18:23 +0000475 name: "art-check-debug-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100476 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100477 srcs: [":com.android.art.debug"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100478 cmd: art_check_apex_gen_stem +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700479 " --debug" +
480 " $(in)" +
481 " && touch $(out)",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000482 out: ["art-check-debug-apex-gen.dummy"],
483}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700484
Jiyong Park1410e9f2019-02-02 04:18:23 +0000485cc_prebuilt_binary {
486 name: "art-check-debug-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100487 defaults: ["art-check-apex-gen-fakebin-defaults"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000488 srcs: [":art-check-debug-apex-gen"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000489}
Andreas Gampe31782c12019-02-06 09:47:25 -0800490
Roland Levillain61f07162019-06-26 12:44:04 +0100491genrule {
492 name: "art-check-testing-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100493 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100494 srcs: [":com.android.art.testing"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100495 cmd: art_check_apex_gen_stem +
Roland Levillain61f07162019-06-26 12:44:04 +0100496 " --testing" +
497 " $(in)" +
498 " && touch $(out)",
499 out: ["art-check-testing-apex-gen.dummy"],
500}
501
502cc_prebuilt_binary {
503 name: "art-check-testing-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100504 defaults: ["art-check-apex-gen-fakebin-defaults"],
Roland Levillain61f07162019-06-26 12:44:04 +0100505 srcs: [":art-check-testing-apex-gen"],
Roland Levillain61f07162019-06-26 12:44:04 +0100506}
507
Andreas Gampe31782c12019-02-06 09:47:25 -0800508// Pre-install scripts.
509
510sh_binary {
511 name: "art_preinstall_hook",
512 src: "art_preinstall_hook.sh",
513}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700514
Andreas Gampe31782c12019-02-06 09:47:25 -0800515sh_binary {
516 name: "art_preinstall_hook_boot",
517 src: "art_preinstall_hook_boot.sh",
518}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700519
Andreas Gampe31782c12019-02-06 09:47:25 -0800520sh_binary {
Andreas Gampe29c111e2019-02-28 13:58:07 -0800521 name: "art_preinstall_hook_system_server",
522 src: "art_preinstall_hook_system_server.sh",
523}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700524
Andreas Gampe29c111e2019-02-28 13:58:07 -0800525sh_binary {
Andreas Gampe31782c12019-02-06 09:47:25 -0800526 name: "art_prepostinstall_utils",
527 src: "art_prepostinstall_utils.sh",
528}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700529
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800530sh_binary {
531 name: "art_postinstall_hook",
532 src: "art_postinstall_hook.sh",
533}
Andreas Gampe57975682019-03-04 09:27:11 -0800534
535sh_binary {
536 name: "art_apex_boot_integrity",
537 src: "art_apex_boot_integrity.sh",
538 init_rc: ["art_apex_boot_integrity.rc"],
539}