blob: 7a17b3a0f947c4aab811b701ebab7b34583577f0 [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,
19// you may have to also add them to `PRIVATE_RUNTIME_DEPENDENCY_LIBS` in
20// `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]
Jiyong Park3296fb12018-12-13 18:32:21 +090043bionic_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +000044 // External API (having APEX stubs).
Jiyong Park3296fb12018-12-13 18:32:21 +090045 "libc",
46 "libm",
47 "libdl",
48]
Jiyong Park408f7d02019-04-02 23:04:42 +090049
Roland Levillain89867bf2019-06-24 15:09:01 +010050bionic_native_device_only_shared_libs = [
Jiyong Park408f7d02019-04-02 23:04:42 +090051 // ... and their internal dependencies
52 // These are available only on device
53 "libc_malloc_debug",
54 "libc_malloc_hooks",
55]
56
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090057bionic_binaries_both = [
58 "linker",
59]
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010060
Roland Levillain38a938e2018-09-21 10:55:51 +010061// - Debug variants (binaries for which a 32-bit version is preferred).
Roland Levillain38a938e2018-09-21 10:55:51 +010062art_runtime_debug_binaries_prefer32 = [
Roland Levillain38a938e2018-09-21 10:55:51 +010063 "dexoptanalyzerd",
64 "profmand",
65]
Alex Light572a0962019-01-18 14:48:37 -080066art_runtime_debug_binaries_prefer32_device = [
67 "dex2oatd",
68]
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +010069
Alex Light572a0962019-01-18 14:48:37 -080070art_runtime_debug_binaries_both_host = [
71 "dex2oatd",
72]
73
Roland Levillaincb82d092018-11-02 18:50:15 +000074// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +010075art_runtime_debug_native_shared_libs = [
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000076 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +010077 "libartd",
78 "libartd-compiler",
Martin Stjernholm356864a2019-04-30 16:22:17 +010079 "libdexfiled_external",
Roland Levillain38a938e2018-09-21 10:55:51 +010080 "libopenjdkjvmd",
81 "libopenjdkjvmtid",
Roland Levillain38a938e2018-09-21 10:55:51 +010082]
83
Orion Hodson5cb98a92019-03-25 15:07:16 +000084// Tools common to both device APEX and host APEX. Derived from art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000085art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010086 "dexdump",
87 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000088]
89
Martin Stjernholm77f17662019-04-03 17:08:21 +010090// Tools common to both device and host debug APEXes.
91art_tools_debug_binaries = [
Roland Levillain6dd62122019-06-18 19:10:21 +010092 "dexanalyze",
Martin Stjernholm77f17662019-04-03 17:08:21 +010093 "dexdiag",
Roland Levillain6dd62122019-06-18 19:10:21 +010094 "dexlayout",
95 "dexlayoutd",
96]
97
98art_tools_debug_binaries_both = [
99 "imgdiag",
100 "imgdiagd",
Martin Stjernholm77f17662019-04-03 17:08:21 +0100101]
102
Orion Hodson5cb98a92019-03-25 15:07:16 +0000103// Tools exclusively for the device APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000104art_tools_device_only_binaries = [
105 // oatdump cannot link with host linux_bionic due to not using clang lld;
106 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +0100107 "oatdump",
108]
Roland Levillain02998cf2019-03-21 14:27:02 +0000109// Same, but for only for debug packages.
110art_tools_debug_device_only_binaries = [
111 // oatdumpd cannot link with host linux_bionic due to not using clang lld;
112 // TODO: Make it work with clang lld.
113 "oatdumpd",
114]
Roland Levillain38a938e2018-09-21 10:55:51 +0100115
Orion Hodson5cb98a92019-03-25 15:07:16 +0000116// Tools exclusively for the host APEX derived from art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000117art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +0100118 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
119 // (same issue as for `libart_fake` above).
120 //"ahat",
121 "hprof-conv",
Roland Levillain38a938e2018-09-21 10:55:51 +0100122]
123
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100124// Libraries needed to use com.android.art.host for zipapex run-tests
Alex Light6585ecb2019-02-08 14:13:22 -0800125art_runtime_host_run_test_libs = [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700126 "libartd-disassembler",
Alex Light6585ecb2019-02-08 14:13:22 -0800127]
128
Roland Levillaina0b19032019-02-08 15:59:56 +0000129// Core Java libraries.
130libcore_java_libs = [
131 "core-oj",
132 "core-libart",
Victor Chang759845f2019-08-06 16:04:36 +0100133 "core-icu4j",
Roland Levillaina0b19032019-02-08 15:59:56 +0000134 "okhttp",
135 "bouncycastle",
136 "apache-xml",
137]
138
139// Native libraries that support the core Java libraries.
Roland Levillain1617f8c2019-03-26 17:52:30 +0000140//
141// Note: ART on-device chroot-based testing and benchmarking is not yet using
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100142// the ART APEX, meaning that copies of some of these libraries have to be
Roland Levillain1617f8c2019-03-26 17:52:30 +0000143// installed in `/system` for the ART Buildbot set-up to work properly. This is
144// done by the `standalone-apex-files` Make phony target, used by the ART
145// Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list,
146// you may have to also add them to `PRIVATE_RUNTIME_DEPENDENCY_LIBS` in
147// `art/Android.mk`.
148// TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100149// the ART APEX.
Roland Levillaincb82d092018-11-02 18:50:15 +0000150libcore_native_shared_libs = [
Martin Stjernholm023c2182019-03-28 15:52:32 +0000151 // External API (having APEX stubs).
Victor Chang2f0008a2019-01-15 14:10:34 +0000152 "libandroidicu",
Pete Bentley79f56622019-03-21 17:09:56 +0000153 "libandroidio",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000154 // TODO(b/124476339): Clean up the following libraries once "required"
155 // dependencies work with APEX libraries.
Victor Chang2f0008a2019-01-15 14:10:34 +0000156 "libexpat",
157 "libicui18n",
158 "libicuuc",
Pete Bentley51ffdbe2019-01-11 15:25:40 +0000159 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +0000160 "libopenjdk",
Martin Stjernholm023c2182019-03-28 15:52:32 +0000161]
162libcore_debug_native_shared_libs = [
163 "libopenjdkd",
Victor Chang2f0008a2019-01-15 14:10:34 +0000164]
165
Martin Stjernholm023c2182019-03-28 15:52:32 +0000166libcore_native_device_only_shared_libs = [
Victor Chang2f0008a2019-01-15 14:10:34 +0000167 // TODO(b/122876336): Remove libpac.so once it's migrated to Webview.
168 // libpac is used by frameworks, not by ART host.
169 "libpac",
Roland Levillaincb82d092018-11-02 18:50:15 +0000170]
171
Alex Lightf7f31522019-02-01 11:14:41 -0800172// Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
173art_runtime_libraries_zipapex = [
174 "libnativebridge",
175 "libnativeloader",
176 "libnativehelper",
177 "libcutils",
178]
179
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100180// Runtime (Bionic) APEX module
181//
182// This used to consist of Bionic, ART and Libcore. Now it contains Bionic only,
183// but keeps /apex/com.android.runtime for app compat reasons.
184//
185// TODO(b/139176024): Move this to the Bionic tree.
186
187android_app_certificate {
188 name: "com.android.runtime.certificate",
189 certificate: "com.android.runtime",
190}
191
Roland Levillain38a938e2018-09-21 10:55:51 +0100192apex_key {
193 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +0900194 public_key: "com.android.runtime.avbpubkey",
195 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +0100196}
197
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100198prebuilt_etc {
199 name: "com.android.runtime.ld.config.txt",
200 src: "runtime-ld.config.txt",
201 filename: "ld.config.txt",
202 installable: false,
203}
204
205apex {
206 name: "com.android.runtime",
207 compile_multilib: "both",
208 manifest: "manifest-runtime.json",
209 native_shared_libs: bionic_native_shared_libs +
210 bionic_native_device_only_shared_libs,
211 multilib: {
212 both: {
213 binaries: bionic_binaries_both,
214 },
215 },
216 prebuilts: ["com.android.runtime.ld.config.txt"],
217 key: "com.android.runtime.key",
218 certificate: ":com.android.runtime.certificate",
219}
220
221// ART APEX module
222//
223// Contains both the Android Managed Runtime (ART) and the Android Core Library
224// (Libcore).
225
Jiyong Parke9618552019-02-11 10:54:36 +0900226android_app_certificate {
Martin Stjernholm6da45692019-08-15 15:18:53 +0100227 name: "com.android.art.certificate",
228 certificate: "com.android.art",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100229}
230
231apex_key {
232 name: "com.android.art.key",
233 public_key: "com.android.art.avbpubkey",
234 private_key: "com.android.art.pem",
Jiyong Parke9618552019-02-11 10:54:36 +0900235}
236
Roland Levillain3be7afe2018-12-04 19:35:03 +0000237prebuilt_etc {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100238 name: "com.android.art.ld.config.txt",
Roland Levillain3be7afe2018-12-04 19:35:03 +0000239 src: "ld.config.txt",
240 filename: "ld.config.txt",
241 installable: false,
242}
243
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100244// Default values shared by device ART APEXes.
Andreas Gampee55ea982019-02-26 09:11:20 -0800245apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100246 name: "com.android.art-defaults",
Roland Levillain53058802018-11-14 17:32:18 +0000247 compile_multilib: "both",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100248 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000249 java_libs: libcore_java_libs,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700250 native_shared_libs: art_runtime_base_native_shared_libs +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700251 libcore_native_device_only_shared_libs +
252 libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000253 multilib: {
254 both: {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100255 binaries: art_runtime_base_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000256 },
257 prefer32: {
258 binaries: art_runtime_base_binaries_prefer32,
259 },
260 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700261 binaries: art_tools_common_binaries +
262 art_tools_device_only_binaries,
263 },
Roland Levillain53058802018-11-14 17:32:18 +0000264 },
Andreas Gampe31782c12019-02-06 09:47:25 -0800265 binaries: [
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800266 "art_postinstall_hook",
Andreas Gampe31782c12019-02-06 09:47:25 -0800267 "art_preinstall_hook",
268 "art_preinstall_hook_boot",
Andreas Gampe29c111e2019-02-28 13:58:07 -0800269 "art_preinstall_hook_system_server",
Andreas Gampe31782c12019-02-06 09:47:25 -0800270 "art_prepostinstall_utils",
271 ],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100272 prebuilts: ["com.android.art.ld.config.txt"],
273 key: "com.android.art.key",
Victor Chang64611242019-07-05 16:32:41 +0100274 required: [
275 "art_apex_boot_integrity",
276 "com.android.i18n",
277 ],
Andreas Gampee55ea982019-02-26 09:11:20 -0800278}
279
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100280// Default values shared by (device) Debug and Testing ART APEXes.
Roland Levillain61f07162019-06-26 12:44:04 +0100281apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100282 name: "com.android.art-dev-defaults",
283 defaults: ["com.android.art-defaults"],
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700284 native_shared_libs: art_runtime_debug_native_shared_libs +
Roland Levillain89867bf2019-06-24 15:09:01 +0100285 libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100286 multilib: {
Roland Levillain6dd62122019-06-18 19:10:21 +0100287 both: {
288 binaries: art_tools_debug_binaries_both,
289 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100290 prefer32: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700291 binaries: art_runtime_debug_binaries_prefer32 +
292 art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100293 },
294 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700295 binaries: art_tools_debug_binaries +
296 art_tools_debug_device_only_binaries,
297 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100298 },
Roland Levillain61f07162019-06-26 12:44:04 +0100299}
300
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100301// Release version of the ART APEX module (not containing debug
Roland Levillain61f07162019-06-26 12:44:04 +0100302// variants nor tools), included in user builds. Also used for
303// storage-constrained devices in userdebug and eng builds.
304apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100305 name: "com.android.art.release",
306 defaults: ["com.android.art-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100307 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100308}
309
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100310// "Debug" version of the ART APEX module (containing both release and
Roland Levillain61f07162019-06-26 12:44:04 +0100311// debug variants, as well as additional tools), included in userdebug and
312// eng build.
313apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100314 name: "com.android.art.debug",
315 defaults: ["com.android.art-dev-defaults"],
Martin Stjernholm6da45692019-08-15 15:18:53 +0100316 certificate: ":com.android.art.certificate",
Roland Levillain38a938e2018-09-21 10:55:51 +0100317}
Alex Lightda948ce2018-12-06 17:05:41 +0000318
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100319// ART gtests with dependencies on internal ART APEX libraries.
Roland Levillain61f07162019-06-26 12:44:04 +0100320art_gtests = [
321 "art_cmdline_tests",
322 "art_compiler_tests",
323 "art_dex2oat_tests",
324 "art_dexanalyze_tests",
325 "art_dexdiag_tests",
326 "art_dexdump_tests",
327 "art_dexlayout_tests",
328 "art_dexlist_tests",
329 "art_dexoptanalyzer_tests",
330 "art_imgdiag_tests",
331 "art_libartbase_tests",
332 "art_libartpalette_tests",
333 "art_libdexfile_tests",
334 "art_libdexfile_support_tests",
335 "art_libprofile_tests",
336 "art_oatdump_tests",
337 "art_profman_tests",
338 "art_runtime_compiler_tests",
339 "art_runtime_tests",
340 "art_sigchain_tests",
341]
342
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100343// "Testing" version of the ART APEX module (containing both release
Roland Levillain61f07162019-06-26 12:44:04 +0100344// and debug variants, additional tools, and ART gtests), for testing
345// purposes only.
346apex_test {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100347 name: "com.android.art.testing",
348 defaults: ["com.android.art-dev-defaults"],
349 file_contexts: "com.android.art.debug",
Martin Stjernholm6da45692019-08-15 15:18:53 +0100350 certificate: ":com.android.art.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100351 tests: art_gtests,
352}
353
354// TODO: Do this better. art_apex_test_host will disable host builds when
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100355// HOST_PREFER_32_BIT is set. We cannot simply use com.android.art.debug
Alex Lightda948ce2018-12-06 17:05:41 +0000356// because binaries have different multilib classes and 'multilib: {}' isn't
357// supported by target: { ... }.
358// See b/120617876 for more information.
Roland Levillain61f07162019-06-26 12:44:04 +0100359art_apex_test_host {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100360 name: "com.android.art.host",
Alex Lightda948ce2018-12-06 17:05:41 +0000361 compile_multilib: "both",
362 payload_type: "zip",
363 host_supported: true,
364 device_supported: false,
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100365 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000366 java_libs: libcore_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800367 ignore_system_library_special_case: true,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700368 native_shared_libs: art_runtime_base_native_shared_libs +
369 art_runtime_debug_native_shared_libs +
370 libcore_native_shared_libs +
371 libcore_debug_native_shared_libs +
372 art_runtime_libraries_zipapex +
373 art_runtime_host_run_test_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000374 multilib: {
375 both: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700376 binaries: art_runtime_base_binaries_both +
Roland Levillain6dd62122019-06-18 19:10:21 +0100377 art_runtime_debug_binaries_both_host +
378 art_tools_debug_binaries_both,
Alex Lightda948ce2018-12-06 17:05:41 +0000379 },
380 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700381 binaries: art_tools_common_binaries + // Host APEX is always debug.
382 art_tools_debug_binaries +
383 art_tools_host_only_binaries +
384 art_runtime_base_binaries_prefer32 +
385 art_runtime_debug_binaries_prefer32,
386 },
Alex Lightda948ce2018-12-06 17:05:41 +0000387 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100388 key: "com.android.art.key",
Alex Lighte3521522018-12-06 22:51:18 -0800389 target: {
390 darwin: {
391 enabled: false,
392 },
Alex Light55a9bad2019-01-29 18:34:09 -0800393 linux_bionic: {
394 enabled: true,
395 multilib: {
396 both: {
397 native_shared_libs: bionic_native_shared_libs,
398 binaries: bionic_binaries_both,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700399 },
400 },
Alex Light55a9bad2019-01-29 18:34:09 -0800401 },
Alex Lighte3521522018-12-06 22:51:18 -0800402 },
Alex Lightda948ce2018-12-06 17:05:41 +0000403}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000404
405python_binary_host {
406 name: "art-apex-tester",
407 srcs: ["art_apex_test.py"],
408 main: "art_apex_test.py",
409 version: {
410 py2: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100411 enabled: true,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000412 },
413 py3: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100414 enabled: false,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000415 },
416 },
417}
418
419// Genrules so we can run the checker, and empty Java library so that it gets executed.
420
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100421art_check_apex_gen_stem = "$(location art-apex-tester)" +
422 " --debugfs $(location debugfs)" +
423 " --tmpdir $(genDir)"
424
425// The non-flattened APEXes are always checked, as they are always generated
426// (even when APEX flattening is enabled).
427genrule_defaults {
428 name: "art-check-apex-gen-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000429 tools: [
430 "art-apex-tester",
431 "debugfs",
432 ],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000433}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700434
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100435cc_defaults {
436 name: "art-check-apex-gen-fakebin-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000437 host_supported: true,
438 device_supported: false,
439 target: {
440 darwin: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700441 enabled: false, // No python3.
Jiyong Park1410e9f2019-02-02 04:18:23 +0000442 },
443 },
444}
445
446genrule {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100447 name: "art-check-release-apex-gen",
448 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100449 srcs: [":com.android.art.release"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100450 cmd: art_check_apex_gen_stem +
451 " $(in)" +
452 " && touch $(out)",
453 out: ["art-check-release-apex-gen.dummy"],
454}
455
456cc_prebuilt_binary {
457 name: "art-check-release-apex-gen-fakebin",
458 defaults: ["art-check-apex-gen-fakebin-defaults"],
459 srcs: [":art-check-release-apex-gen"],
460}
461
462genrule {
Jiyong Park1410e9f2019-02-02 04:18:23 +0000463 name: "art-check-debug-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100464 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100465 srcs: [":com.android.art.debug"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100466 cmd: art_check_apex_gen_stem +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700467 " --debug" +
468 " $(in)" +
469 " && touch $(out)",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000470 out: ["art-check-debug-apex-gen.dummy"],
471}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700472
Jiyong Park1410e9f2019-02-02 04:18:23 +0000473cc_prebuilt_binary {
474 name: "art-check-debug-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100475 defaults: ["art-check-apex-gen-fakebin-defaults"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000476 srcs: [":art-check-debug-apex-gen"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000477}
Andreas Gampe31782c12019-02-06 09:47:25 -0800478
Roland Levillain61f07162019-06-26 12:44:04 +0100479genrule {
480 name: "art-check-testing-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100481 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100482 srcs: [":com.android.art.testing"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100483 cmd: art_check_apex_gen_stem +
Roland Levillain61f07162019-06-26 12:44:04 +0100484 " --testing" +
485 " $(in)" +
486 " && touch $(out)",
487 out: ["art-check-testing-apex-gen.dummy"],
488}
489
490cc_prebuilt_binary {
491 name: "art-check-testing-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100492 defaults: ["art-check-apex-gen-fakebin-defaults"],
Roland Levillain61f07162019-06-26 12:44:04 +0100493 srcs: [":art-check-testing-apex-gen"],
Roland Levillain61f07162019-06-26 12:44:04 +0100494}
495
Andreas Gampe31782c12019-02-06 09:47:25 -0800496// Pre-install scripts.
497
498sh_binary {
499 name: "art_preinstall_hook",
500 src: "art_preinstall_hook.sh",
501}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700502
Andreas Gampe31782c12019-02-06 09:47:25 -0800503sh_binary {
504 name: "art_preinstall_hook_boot",
505 src: "art_preinstall_hook_boot.sh",
506}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700507
Andreas Gampe31782c12019-02-06 09:47:25 -0800508sh_binary {
Andreas Gampe29c111e2019-02-28 13:58:07 -0800509 name: "art_preinstall_hook_system_server",
510 src: "art_preinstall_hook_system_server.sh",
511}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700512
Andreas Gampe29c111e2019-02-28 13:58:07 -0800513sh_binary {
Andreas Gampe31782c12019-02-06 09:47:25 -0800514 name: "art_prepostinstall_utils",
515 src: "art_prepostinstall_utils.sh",
516}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700517
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800518sh_binary {
519 name: "art_postinstall_hook",
520 src: "art_postinstall_hook.sh",
521}
Andreas Gampe57975682019-03-04 09:27:11 -0800522
523sh_binary {
524 name: "art_apex_boot_integrity",
525 src: "art_apex_boot_integrity.sh",
526 init_rc: ["art_apex_boot_integrity.rc"],
527}