blob: 8df91e2117666eee95d29d5f66a82aabc3b86bd2 [file] [log] [blame]
Roland Levillain38a938e2018-09-21 10:55:51 +01001// Android Runtime APEX module.
2
3// Modules listed in LOCAL_REQUIRED_MODULES for module art-runtime in art/Android.mk.
4// - Base requirements (binaries for which both 32- and 64-bit versions are built, if relevant).
5art_runtime_base_binaries_both = [
6 "dalvikvm",
7]
8// - Base requirements (binaries for which a 32-bit version is preferred).
9art_runtime_base_binaries_prefer32 = [
10 "dex2oat",
11 "dexoptanalyzer",
12 "profman",
13]
14// - Base requirements (libraries).
15art_runtime_base_native_shared_libs = [
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000016 "libadbconnection",
Roland Levillain38a938e2018-09-21 10:55:51 +010017 "libart",
18 "libart-compiler",
Martin Stjernholm84bf6982019-02-05 15:07:57 +000019 "libdexfile_external",
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000020 "libnativebridge",
21 "libnativehelper",
22 "libnativeloader",
Roland Levillain38a938e2018-09-21 10:55:51 +010023 "libopenjdkjvm",
24 "libopenjdkjvmti",
Martin Stjernholm0c15b822019-02-14 17:24:19 +000025 // TODO(b/124439236): Clean up the following libraries once "required"
26 // dependencies work with APEX libraries.
27 "libdt_fd_forward",
28 "libdt_socket",
29 "libjdwp",
30 "libnpt",
Roland Levillain38a938e2018-09-21 10:55:51 +010031]
Jiyong Park3296fb12018-12-13 18:32:21 +090032bionic_native_shared_libs = [
33 "libc",
34 "libm",
35 "libdl",
36]
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090037bionic_binaries_both = [
38 "linker",
39]
Roland Levillain38a938e2018-09-21 10:55:51 +010040// - Debug variants (binaries for which a 32-bit version is preferred).
Roland Levillain38a938e2018-09-21 10:55:51 +010041art_runtime_debug_binaries_prefer32 = [
Roland Levillain38a938e2018-09-21 10:55:51 +010042 "dexoptanalyzerd",
43 "profmand",
44]
Alex Light572a0962019-01-18 14:48:37 -080045art_runtime_debug_binaries_prefer32_device = [
46 "dex2oatd",
47]
48art_runtime_debug_binaries_both_host = [
49 "dex2oatd",
50]
51
Roland Levillaincb82d092018-11-02 18:50:15 +000052// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +010053art_runtime_debug_native_shared_libs = [
Martin Stjernholmc2f8b502019-01-17 14:51:35 +000054 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +010055 "libartd",
56 "libartd-compiler",
Roland Levillain38a938e2018-09-21 10:55:51 +010057 "libopenjdkjvmd",
58 "libopenjdkjvmtid",
Roland Levillain38a938e2018-09-21 10:55:51 +010059]
Roland Levillaincb82d092018-11-02 18:50:15 +000060libcore_debug_native_shared_libs = [
61 "libopenjdkd",
62]
Roland Levillain38a938e2018-09-21 10:55:51 +010063
Neil Fuller5ab4a562018-12-11 20:33:46 +000064// Data files associated with bionic / managed core library APIs.
65art_runtime_data_file_prebuilts = [
Neil Fullera886dab2018-12-06 15:12:52 +000066 "apex_tz_version",
67 "apex_tzdata",
68 "apex_tzlookup.xml",
Neil Fuller5ab4a562018-12-11 20:33:46 +000069 "apex_icu.dat",
Neil Fullera886dab2018-12-06 15:12:52 +000070]
71
Roland Levillain38a938e2018-09-21 10:55:51 +010072// Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000073art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010074 "dexdiag",
75 "dexdump",
76 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000077]
78
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000079// Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
80art_tools_device_only_binaries = [
81 // oatdump cannot link with host linux_bionic due to not using clang lld;
82 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +010083 "oatdump",
84]
85
86// Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000087art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010088 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
89 // (same issue as for `libart_fake` above).
90 //"ahat",
91 "hprof-conv",
92 // ...
93]
94
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000095art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries
96art_tools_host_binaries = art_tools_common_binaries + art_tools_host_only_binaries
Alex Lightda948ce2018-12-06 17:05:41 +000097
Alex Light6585ecb2019-02-08 14:13:22 -080098// Libraries needed to use com.android.runtime.host for zipapex run-tests
99art_runtime_host_run_test_libs = [
100 "libartd-disassembler"
101]
102
Roland Levillaina0b19032019-02-08 15:59:56 +0000103// Core Java libraries.
104libcore_java_libs = [
105 "core-oj",
106 "core-libart",
107 "okhttp",
108 "bouncycastle",
109 "apache-xml",
110]
111
112// Native libraries that support the core Java libraries.
Roland Levillaincb82d092018-11-02 18:50:15 +0000113libcore_native_shared_libs = [
Victor Chang2f0008a2019-01-15 14:10:34 +0000114 "libandroidicu",
115 "libexpat",
116 "libicui18n",
117 "libicuuc",
Pete Bentley51ffdbe2019-01-11 15:25:40 +0000118 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +0000119 "libopenjdk",
Pete Bentley51ffdbe2019-01-11 15:25:40 +0000120 "libz",
Victor Chang2f0008a2019-01-15 14:10:34 +0000121 "libziparchive",
122]
123
124libcore_native_device_only_shared_libs = libcore_native_shared_libs + [
125 // TODO(b/122876336): Remove libpac.so once it's migrated to Webview.
126 // libpac is used by frameworks, not by ART host.
127 "libpac",
Roland Levillaincb82d092018-11-02 18:50:15 +0000128]
129
Alex Lightf7f31522019-02-01 11:14:41 -0800130// Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
131art_runtime_libraries_zipapex = [
132 "libnativebridge",
133 "libnativeloader",
134 "libnativehelper",
135 "libcutils",
136]
137
Roland Levillain38a938e2018-09-21 10:55:51 +0100138apex_key {
139 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +0900140 public_key: "com.android.runtime.avbpubkey",
141 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +0100142}
143
Jiyong Parke9618552019-02-11 10:54:36 +0900144android_app_certificate {
145 name: "com.android.runtime.debug.certificate",
146 certificate: "com.android.runtime.debug",
147}
148
149android_app_certificate {
150 name: "com.android.runtime.release.certificate",
151 certificate: "com.android.runtime.release",
152}
153
Roland Levillain3be7afe2018-12-04 19:35:03 +0000154prebuilt_etc {
155 name: "com.android.runtime.ld.config.txt",
156 src: "ld.config.txt",
157 filename: "ld.config.txt",
158 installable: false,
159}
160
Andreas Gampee55ea982019-02-26 09:11:20 -0800161apex_defaults {
162 name: "com.android.runtime-defaults",
Roland Levillain53058802018-11-14 17:32:18 +0000163 compile_multilib: "both",
164 manifest: "manifest.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000165 java_libs: libcore_java_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000166 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000167 + bionic_native_shared_libs
Victor Chang2f0008a2019-01-15 14:10:34 +0000168 + libcore_native_device_only_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000169 multilib: {
170 both: {
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900171 binaries: art_runtime_base_binaries_both
172 + bionic_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000173 },
174 prefer32: {
175 binaries: art_runtime_base_binaries_prefer32,
176 },
177 first: {
178 binaries: [],
179 }
180 },
Andreas Gampe31782c12019-02-06 09:47:25 -0800181 binaries: [
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800182 "art_postinstall_hook",
Andreas Gampe31782c12019-02-06 09:47:25 -0800183 "art_preinstall_hook",
184 "art_preinstall_hook_boot",
185 "art_prepostinstall_utils",
186 ],
Neil Fuller5ab4a562018-12-11 20:33:46 +0000187 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000188 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000189 key: "com.android.runtime.key",
Andreas Gampee55ea982019-02-26 09:11:20 -0800190}
191
192// Release version of the Runtime APEX module (not containing debug
193// variants nor tools), included in user builds. Also used for
194// storage-constrained devices in userdebug and eng builds.
195apex {
196 name: "com.android.runtime.release",
197 defaults: ["com.android.runtime-defaults"],
Jiyong Parke9618552019-02-11 10:54:36 +0900198 certificate: ":com.android.runtime.release.certificate",
Roland Levillain53058802018-11-14 17:32:18 +0000199}
200
201// "Debug" version of the Runtime APEX module (containing both release and
202// debug variants, as well as additional tools), included in userdebug and
203// eng build.
204apex {
205 name: "com.android.runtime.debug",
Andreas Gampee55ea982019-02-26 09:11:20 -0800206 defaults: ["com.android.runtime-defaults"],
207 native_shared_libs: art_runtime_debug_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000208 + libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100209 multilib: {
Roland Levillain38a938e2018-09-21 10:55:51 +0100210 prefer32: {
Andreas Gampee55ea982019-02-26 09:11:20 -0800211 binaries: art_runtime_debug_binaries_prefer32
Alex Light572a0962019-01-18 14:48:37 -0800212 + art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100213 },
214 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000215 binaries: art_tools_device_binaries,
Roland Levillain38a938e2018-09-21 10:55:51 +0100216 }
217 },
Jiyong Parke9618552019-02-11 10:54:36 +0900218 certificate: ":com.android.runtime.debug.certificate",
Roland Levillain38a938e2018-09-21 10:55:51 +0100219}
Alex Lightda948ce2018-12-06 17:05:41 +0000220
221// TODO: Do this better. art_apex will disable host builds when
222// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
223// because binaries have different multilib classes and 'multilib: {}' isn't
224// supported by target: { ... }.
225// See b/120617876 for more information.
Alex Light0239f2f2019-02-07 13:38:50 -0800226art_apex_test {
Alex Lightda948ce2018-12-06 17:05:41 +0000227 name: "com.android.runtime.host",
228 compile_multilib: "both",
229 payload_type: "zip",
230 host_supported: true,
231 device_supported: false,
232 manifest: "manifest.json",
Roland Levillaina0b19032019-02-08 15:59:56 +0000233 java_libs: libcore_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800234 ignore_system_library_special_case: true,
Alex Lightda948ce2018-12-06 17:05:41 +0000235 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000236 + art_runtime_debug_native_shared_libs
237 + libcore_native_shared_libs
Alex Lightf7f31522019-02-01 11:14:41 -0800238 + libcore_debug_native_shared_libs
Alex Light6585ecb2019-02-08 14:13:22 -0800239 + art_runtime_libraries_zipapex
240 + art_runtime_host_run_test_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000241 multilib: {
242 both: {
Alex Light572a0962019-01-18 14:48:37 -0800243 binaries: art_runtime_base_binaries_both
244 + art_runtime_debug_binaries_both_host,
Alex Lightda948ce2018-12-06 17:05:41 +0000245 },
246 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000247 binaries: art_tools_host_binaries
Alex Lightda948ce2018-12-06 17:05:41 +0000248 + art_runtime_base_binaries_prefer32
249 + art_runtime_debug_binaries_prefer32,
250 }
251 },
252 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800253 target: {
254 darwin: {
255 enabled: false,
256 },
Alex Light55a9bad2019-01-29 18:34:09 -0800257 linux_bionic: {
258 enabled: true,
259 multilib: {
260 both: {
261 native_shared_libs: bionic_native_shared_libs,
262 binaries: bionic_binaries_both,
263 }
264 }
265 },
Alex Lighte3521522018-12-06 22:51:18 -0800266 },
Alex Lightda948ce2018-12-06 17:05:41 +0000267}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000268
269python_binary_host {
270 name: "art-apex-tester",
271 srcs: ["art_apex_test.py"],
272 main: "art_apex_test.py",
273 version: {
274 py2: {
275 enabled: false,
276 },
277 py3: {
278 enabled: true,
279 },
280 },
281}
282
283// Genrules so we can run the checker, and empty Java library so that it gets executed.
284
285genrule {
286 name: "art-check-release-apex-gen",
287 srcs: [":com.android.runtime.release"],
288 tools: [
289 "art-apex-tester",
290 "debugfs",
291 ],
292 cmd: "$(location art-apex-tester)"
293 + " --debugfs $(location debugfs)"
294 + " --tmpdir $(genDir)"
295 + " $(in)"
296 + " && touch $(out)",
297 out: ["art-check-release-apex-gen.dummy"],
298}
299cc_prebuilt_binary {
300 name: "art-check-release-apex-gen-fakebin",
301 srcs: [":art-check-release-apex-gen"],
302 host_supported: true,
303 device_supported: false,
304 target: {
305 darwin: {
306 enabled: false, // No python3.
307 },
308 },
309}
310
311genrule {
312 name: "art-check-debug-apex-gen",
313 srcs: [":com.android.runtime.debug"],
314 tools: [
315 "art-apex-tester",
316 "debugfs",
317 ],
318 cmd: "$(location art-apex-tester)"
319 + " --debugfs $(location debugfs)"
320 + " --tmpdir $(genDir)"
321 + " --debug"
322 + " $(in)"
323 + " && touch $(out)",
324 out: ["art-check-debug-apex-gen.dummy"],
325}
326cc_prebuilt_binary {
327 name: "art-check-debug-apex-gen-fakebin",
328 srcs: [":art-check-debug-apex-gen"],
329 host_supported: true,
330 device_supported: false,
331 target: {
332 darwin: {
333 enabled: false, // No python3.
334 },
335 },
336}
Andreas Gampe31782c12019-02-06 09:47:25 -0800337
338// Pre-install scripts.
339
340sh_binary {
341 name: "art_preinstall_hook",
342 src: "art_preinstall_hook.sh",
343}
344sh_binary {
345 name: "art_preinstall_hook_boot",
346 src: "art_preinstall_hook_boot.sh",
347}
348sh_binary {
349 name: "art_prepostinstall_utils",
350 src: "art_prepostinstall_utils.sh",
351}
Andreas Gampe5bb525a2019-02-19 12:26:35 -0800352sh_binary {
353 name: "art_postinstall_hook",
354 src: "art_postinstall_hook.sh",
355}