blob: 6b806a0d3871ea4ef5376cc1e23966f6617c9f03 [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 Stjernholmfb3a94b2019-07-05 22:27:36 +0100227 name: "com.android.art.release.certificate",
228 certificate: "com.android.art.release",
Roland Levillain61f07162019-06-26 12:44:04 +0100229}
230
231android_app_certificate {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100232 name: "com.android.art.debug.certificate",
233 certificate: "com.android.art.debug",
Jiyong Parke9618552019-02-11 10:54:36 +0900234}
235
236android_app_certificate {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100237 name: "com.android.art.testing.certificate",
238 certificate: "com.android.art.testing",
239}
240
241apex_key {
242 name: "com.android.art.key",
243 public_key: "com.android.art.avbpubkey",
244 private_key: "com.android.art.pem",
Jiyong Parke9618552019-02-11 10:54:36 +0900245}
246
Roland Levillain3be7afe2018-12-04 19:35:03 +0000247prebuilt_etc {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100248 name: "com.android.art.ld.config.txt",
Roland Levillain3be7afe2018-12-04 19:35:03 +0000249 src: "ld.config.txt",
250 filename: "ld.config.txt",
251 installable: false,
252}
253
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100254// Default values shared by device ART APEXes.
Andreas Gampee55ea982019-02-26 09:11:20 -0800255apex_defaults {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100256 name: "com.android.art-defaults",
Roland Levillain53058802018-11-14 17:32:18 +0000257 compile_multilib: "both",
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100258 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000259 java_libs: libcore_java_libs,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700260 native_shared_libs: art_runtime_base_native_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"],
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700294 native_shared_libs: art_runtime_debug_native_shared_libs +
Roland Levillain89867bf2019-06-24 15:09:01 +0100295 libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100296 multilib: {
Roland Levillain6dd62122019-06-18 19:10:21 +0100297 both: {
298 binaries: art_tools_debug_binaries_both,
299 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100300 prefer32: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700301 binaries: art_runtime_debug_binaries_prefer32 +
302 art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100303 },
304 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700305 binaries: art_tools_debug_binaries +
306 art_tools_debug_device_only_binaries,
307 },
Roland Levillain38a938e2018-09-21 10:55:51 +0100308 },
Roland Levillain61f07162019-06-26 12:44:04 +0100309}
310
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100311// Release version of the ART APEX module (not containing debug
Roland Levillain61f07162019-06-26 12:44:04 +0100312// variants nor tools), included in user builds. Also used for
313// storage-constrained devices in userdebug and eng builds.
314apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100315 name: "com.android.art.release",
316 defaults: ["com.android.art-defaults"],
317 certificate: ":com.android.art.release.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100318}
319
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100320// "Debug" version of the ART APEX module (containing both release and
Roland Levillain61f07162019-06-26 12:44:04 +0100321// debug variants, as well as additional tools), included in userdebug and
322// eng build.
323apex {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100324 name: "com.android.art.debug",
325 defaults: ["com.android.art-dev-defaults"],
326 certificate: ":com.android.art.debug.certificate",
Roland Levillain38a938e2018-09-21 10:55:51 +0100327}
Alex Lightda948ce2018-12-06 17:05:41 +0000328
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100329// ART gtests with dependencies on internal ART APEX libraries.
Roland Levillain61f07162019-06-26 12:44:04 +0100330art_gtests = [
331 "art_cmdline_tests",
332 "art_compiler_tests",
333 "art_dex2oat_tests",
334 "art_dexanalyze_tests",
335 "art_dexdiag_tests",
336 "art_dexdump_tests",
337 "art_dexlayout_tests",
338 "art_dexlist_tests",
339 "art_dexoptanalyzer_tests",
340 "art_imgdiag_tests",
341 "art_libartbase_tests",
342 "art_libartpalette_tests",
343 "art_libdexfile_tests",
344 "art_libdexfile_support_tests",
345 "art_libprofile_tests",
346 "art_oatdump_tests",
347 "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.
356apex_test {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100357 name: "com.android.art.testing",
358 defaults: ["com.android.art-dev-defaults"],
359 file_contexts: "com.android.art.debug",
360 certificate: ":com.android.art.testing.certificate",
Roland Levillain61f07162019-06-26 12:44:04 +0100361 tests: art_gtests,
362}
363
364// TODO: Do this better. art_apex_test_host will disable host builds when
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100365// HOST_PREFER_32_BIT is set. We cannot simply use com.android.art.debug
Alex Lightda948ce2018-12-06 17:05:41 +0000366// because binaries have different multilib classes and 'multilib: {}' isn't
367// supported by target: { ... }.
368// See b/120617876 for more information.
Roland Levillain61f07162019-06-26 12:44:04 +0100369art_apex_test_host {
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100370 name: "com.android.art.host",
Alex Lightda948ce2018-12-06 17:05:41 +0000371 compile_multilib: "both",
372 payload_type: "zip",
373 host_supported: true,
374 device_supported: false,
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100375 manifest: "manifest-art.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000376 java_libs: libcore_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800377 ignore_system_library_special_case: true,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700378 native_shared_libs: art_runtime_base_native_shared_libs +
379 art_runtime_debug_native_shared_libs +
380 libcore_native_shared_libs +
381 libcore_debug_native_shared_libs +
382 art_runtime_libraries_zipapex +
383 art_runtime_host_run_test_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000384 multilib: {
385 both: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700386 binaries: art_runtime_base_binaries_both +
Roland Levillain6dd62122019-06-18 19:10:21 +0100387 art_runtime_debug_binaries_both_host +
388 art_tools_debug_binaries_both,
Alex Lightda948ce2018-12-06 17:05:41 +0000389 },
390 first: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700391 binaries: art_tools_common_binaries + // Host APEX is always debug.
392 art_tools_debug_binaries +
393 art_tools_host_only_binaries +
394 art_runtime_base_binaries_prefer32 +
395 art_runtime_debug_binaries_prefer32,
396 },
Alex Lightda948ce2018-12-06 17:05:41 +0000397 },
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100398 key: "com.android.art.key",
Alex Lighte3521522018-12-06 22:51:18 -0800399 target: {
400 darwin: {
401 enabled: false,
402 },
Alex Light55a9bad2019-01-29 18:34:09 -0800403 linux_bionic: {
404 enabled: true,
405 multilib: {
406 both: {
407 native_shared_libs: bionic_native_shared_libs,
408 binaries: bionic_binaries_both,
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700409 },
410 },
Alex Light55a9bad2019-01-29 18:34:09 -0800411 },
Alex Lighte3521522018-12-06 22:51:18 -0800412 },
Alex Lightda948ce2018-12-06 17:05:41 +0000413}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000414
415python_binary_host {
416 name: "art-apex-tester",
417 srcs: ["art_apex_test.py"],
418 main: "art_apex_test.py",
419 version: {
420 py2: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100421 enabled: true,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000422 },
423 py3: {
Roland Levillain29e740f2019-08-20 15:31:37 +0100424 enabled: false,
Jiyong Park1410e9f2019-02-02 04:18:23 +0000425 },
426 },
427}
428
429// Genrules so we can run the checker, and empty Java library so that it gets executed.
430
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100431art_check_apex_gen_stem = "$(location art-apex-tester)" +
432 " --debugfs $(location debugfs)" +
433 " --tmpdir $(genDir)"
434
435// The non-flattened APEXes are always checked, as they are always generated
436// (even when APEX flattening is enabled).
437genrule_defaults {
438 name: "art-check-apex-gen-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000439 tools: [
440 "art-apex-tester",
441 "debugfs",
442 ],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000443}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700444
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100445cc_defaults {
446 name: "art-check-apex-gen-fakebin-defaults",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000447 host_supported: true,
448 device_supported: false,
449 target: {
450 darwin: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700451 enabled: false, // No python3.
Jiyong Park1410e9f2019-02-02 04:18:23 +0000452 },
453 },
454}
455
456genrule {
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100457 name: "art-check-release-apex-gen",
458 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100459 srcs: [":com.android.art.release"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100460 cmd: art_check_apex_gen_stem +
461 " $(in)" +
462 " && touch $(out)",
463 out: ["art-check-release-apex-gen.dummy"],
464}
465
466cc_prebuilt_binary {
467 name: "art-check-release-apex-gen-fakebin",
468 defaults: ["art-check-apex-gen-fakebin-defaults"],
469 srcs: [":art-check-release-apex-gen"],
470}
471
472genrule {
Jiyong Park1410e9f2019-02-02 04:18:23 +0000473 name: "art-check-debug-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100474 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100475 srcs: [":com.android.art.debug"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100476 cmd: art_check_apex_gen_stem +
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700477 " --debug" +
478 " $(in)" +
479 " && touch $(out)",
Jiyong Park1410e9f2019-02-02 04:18:23 +0000480 out: ["art-check-debug-apex-gen.dummy"],
481}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700482
Jiyong Park1410e9f2019-02-02 04:18:23 +0000483cc_prebuilt_binary {
484 name: "art-check-debug-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100485 defaults: ["art-check-apex-gen-fakebin-defaults"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000486 srcs: [":art-check-debug-apex-gen"],
Jiyong Park1410e9f2019-02-02 04:18:23 +0000487}
Andreas Gampe31782c12019-02-06 09:47:25 -0800488
Roland Levillain61f07162019-06-26 12:44:04 +0100489genrule {
490 name: "art-check-testing-apex-gen",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100491 defaults: ["art-check-apex-gen-defaults"],
Martin Stjernholmfb3a94b2019-07-05 22:27:36 +0100492 srcs: [":com.android.art.testing"],
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100493 cmd: art_check_apex_gen_stem +
Roland Levillain61f07162019-06-26 12:44:04 +0100494 " --testing" +
495 " $(in)" +
496 " && touch $(out)",
497 out: ["art-check-testing-apex-gen.dummy"],
498}
499
500cc_prebuilt_binary {
501 name: "art-check-testing-apex-gen-fakebin",
Roland Levillaind4fc62c2019-08-12 19:47:51 +0100502 defaults: ["art-check-apex-gen-fakebin-defaults"],
Roland Levillain61f07162019-06-26 12:44:04 +0100503 srcs: [":art-check-testing-apex-gen"],
Roland Levillain61f07162019-06-26 12:44:04 +0100504}
505
Andreas Gampe31782c12019-02-06 09:47:25 -0800506// Pre-install scripts.
507
508sh_binary {
509 name: "art_preinstall_hook",
510 src: "art_preinstall_hook.sh",
511}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700512
Andreas Gampe31782c12019-02-06 09:47:25 -0800513sh_binary {
514 name: "art_preinstall_hook_boot",
515 src: "art_preinstall_hook_boot.sh",
516}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700517
Andreas Gampe31782c12019-02-06 09:47:25 -0800518sh_binary {
Andreas Gampe29c111e2019-02-28 13:58:07 -0800519 name: "art_preinstall_hook_system_server",
520 src: "art_preinstall_hook_system_server.sh",
521}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700522
Andreas Gampe29c111e2019-02-28 13:58:07 -0800523sh_binary {
Andreas Gampe31782c12019-02-06 09:47:25 -0800524 name: "art_prepostinstall_utils",
525 src: "art_prepostinstall_utils.sh",
526}
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700527
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800528sh_binary {
529 name: "art_postinstall_hook",
530 src: "art_postinstall_hook.sh",
531}
Andreas Gampe57975682019-03-04 09:27:11 -0800532
533sh_binary {
534 name: "art_apex_boot_integrity",
535 src: "art_apex_boot_integrity.sh",
536 init_rc: ["art_apex_boot_integrity.rc"],
537}