blob: 1bf41e7945596a9d2fdb3cdaf0031d7c8bdb6911 [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 = [
16 "libart",
17 "libart-compiler",
18 "libopenjdkjvm",
19 "libopenjdkjvmti",
Martin Stjernholm7e7ab232019-02-01 12:58:08 +000020 "libadbconnection",
Roland Levillain38a938e2018-09-21 10:55:51 +010021]
Jiyong Park3296fb12018-12-13 18:32:21 +090022bionic_native_shared_libs = [
23 "libc",
24 "libm",
25 "libdl",
26]
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090027bionic_binaries_both = [
28 "linker",
29]
Roland Levillain38a938e2018-09-21 10:55:51 +010030// - Debug variants (binaries for which a 32-bit version is preferred).
Roland Levillain38a938e2018-09-21 10:55:51 +010031art_runtime_debug_binaries_prefer32 = [
Roland Levillain38a938e2018-09-21 10:55:51 +010032 "dexoptanalyzerd",
33 "profmand",
34]
Alex Light572a0962019-01-18 14:48:37 -080035art_runtime_debug_binaries_prefer32_device = [
36 "dex2oatd",
37]
38art_runtime_debug_binaries_both_host = [
39 "dex2oatd",
40]
41
Roland Levillaincb82d092018-11-02 18:50:15 +000042// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +010043art_runtime_debug_native_shared_libs = [
44 "libartd",
45 "libartd-compiler",
Roland Levillain38a938e2018-09-21 10:55:51 +010046 "libopenjdkjvmd",
47 "libopenjdkjvmtid",
Martin Stjernholm7e7ab232019-02-01 12:58:08 +000048 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +010049]
Roland Levillaincb82d092018-11-02 18:50:15 +000050libcore_debug_native_shared_libs = [
51 "libopenjdkd",
52]
Roland Levillain38a938e2018-09-21 10:55:51 +010053
Neil Fuller5ab4a562018-12-11 20:33:46 +000054// Data files associated with bionic / managed core library APIs.
55art_runtime_data_file_prebuilts = [
Neil Fullera886dab2018-12-06 15:12:52 +000056 "apex_tz_version",
57 "apex_tzdata",
58 "apex_tzlookup.xml",
Neil Fuller5ab4a562018-12-11 20:33:46 +000059 "apex_icu.dat",
Neil Fullera886dab2018-12-06 15:12:52 +000060]
61
Roland Levillain38a938e2018-09-21 10:55:51 +010062// Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000063art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010064 "dexdiag",
65 "dexdump",
66 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000067]
68
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000069// Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
70art_tools_device_only_binaries = [
71 // oatdump cannot link with host linux_bionic due to not using clang lld;
72 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +010073 "oatdump",
74]
75
76// Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000077art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010078 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
79 // (same issue as for `libart_fake` above).
80 //"ahat",
81 "hprof-conv",
82 // ...
83]
84
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000085art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries
86art_tools_host_binaries = art_tools_common_binaries + art_tools_host_only_binaries
Alex Lightda948ce2018-12-06 17:05:41 +000087
Pete Bentley51ffdbe2019-01-11 15:25:40 +000088// Libcore native libraries.
Roland Levillaincb82d092018-11-02 18:50:15 +000089libcore_native_shared_libs = [
Pete Bentley51ffdbe2019-01-11 15:25:40 +000090 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +000091 "libopenjdk",
Pete Bentley51ffdbe2019-01-11 15:25:40 +000092 "libexpat",
93 "libz",
94 "libziparchive"
Roland Levillaincb82d092018-11-02 18:50:15 +000095]
96
Nicolas Geoffraycc64d082019-01-25 09:43:18 +000097// Java libraries
98libcore_target_java_libs = [
99 "core-oj",
100 "core-libart",
101 "okhttp",
102 "bouncycastle",
103 "apache-xml",
104]
105
Alex Lightf7f31522019-02-01 11:14:41 -0800106// Temporary library includes for b/123591866 as all libraries are moved into the main art-apex.
107art_runtime_libraries_zipapex = [
108 "libnativebridge",
109 "libnativeloader",
110 "libnativehelper",
111 "libcutils",
112]
113
Roland Levillain38a938e2018-09-21 10:55:51 +0100114apex_key {
115 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +0900116 public_key: "com.android.runtime.avbpubkey",
117 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +0100118}
119
Roland Levillain3be7afe2018-12-04 19:35:03 +0000120prebuilt_etc {
121 name: "com.android.runtime.ld.config.txt",
122 src: "ld.config.txt",
123 filename: "ld.config.txt",
124 installable: false,
125}
126
Roland Levillain53058802018-11-14 17:32:18 +0000127// TODO: Introduce `apex_defaults` to factor common parts of `apex`
128// module definitions below?
129
130// Release version of the Runtime APEX module (not containing debug
131// variants nor tools), included in user builds. Also used for
132// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +0100133apex {
Roland Levillain53058802018-11-14 17:32:18 +0000134 name: "com.android.runtime.release",
135 compile_multilib: "both",
136 manifest: "manifest.json",
Nicolas Geoffraycc64d082019-01-25 09:43:18 +0000137 java_libs: libcore_target_java_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000138 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000139 + bionic_native_shared_libs
140 + libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000141 multilib: {
142 both: {
143 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
144 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900145 binaries: art_runtime_base_binaries_both
146 + bionic_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000147 },
148 prefer32: {
149 binaries: art_runtime_base_binaries_prefer32,
150 },
151 first: {
152 binaries: [],
153 }
154 },
Neil Fuller5ab4a562018-12-11 20:33:46 +0000155 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000156 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000157 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000158}
159
160// "Debug" version of the Runtime APEX module (containing both release and
161// debug variants, as well as additional tools), included in userdebug and
162// eng build.
163apex {
164 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100165 compile_multilib: "both",
166 manifest: "manifest.json",
Nicolas Geoffraycc64d082019-01-25 09:43:18 +0000167 java_libs: libcore_target_java_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100168 native_shared_libs: art_runtime_base_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900169 + art_runtime_debug_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000170 + bionic_native_shared_libs
171 + libcore_native_shared_libs
172 + libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100173 multilib: {
174 both: {
175 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
176 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900177 binaries: art_runtime_base_binaries_both
178 + bionic_binaries_both,
Roland Levillain38a938e2018-09-21 10:55:51 +0100179 },
180 prefer32: {
181 binaries: art_runtime_base_binaries_prefer32
Alex Light572a0962019-01-18 14:48:37 -0800182 + art_runtime_debug_binaries_prefer32
183 + art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100184 },
185 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000186 binaries: art_tools_device_binaries,
Roland Levillain38a938e2018-09-21 10:55:51 +0100187 }
188 },
Neil Fuller5ab4a562018-12-11 20:33:46 +0000189 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000190 + ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100191 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100192}
Alex Lightda948ce2018-12-06 17:05:41 +0000193
194// TODO: Do this better. art_apex will disable host builds when
195// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
196// because binaries have different multilib classes and 'multilib: {}' isn't
197// supported by target: { ... }.
198// See b/120617876 for more information.
Alex Light0239f2f2019-02-07 13:38:50 -0800199art_apex_test {
Alex Lightda948ce2018-12-06 17:05:41 +0000200 name: "com.android.runtime.host",
201 compile_multilib: "both",
202 payload_type: "zip",
203 host_supported: true,
204 device_supported: false,
205 manifest: "manifest.json",
Alex Lighta6ea6022019-01-29 11:02:03 -0800206 java_libs: libcore_target_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800207 ignore_system_library_special_case: true,
Alex Lightda948ce2018-12-06 17:05:41 +0000208 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000209 + art_runtime_debug_native_shared_libs
210 + libcore_native_shared_libs
Alex Lightf7f31522019-02-01 11:14:41 -0800211 + libcore_debug_native_shared_libs
212 + art_runtime_libraries_zipapex,
Alex Lightda948ce2018-12-06 17:05:41 +0000213 multilib: {
214 both: {
215 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
216 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Alex Light572a0962019-01-18 14:48:37 -0800217 binaries: art_runtime_base_binaries_both
218 + art_runtime_debug_binaries_both_host,
Alex Lightda948ce2018-12-06 17:05:41 +0000219 },
220 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000221 binaries: art_tools_host_binaries
Alex Lightda948ce2018-12-06 17:05:41 +0000222 + art_runtime_base_binaries_prefer32
223 + art_runtime_debug_binaries_prefer32,
224 }
225 },
226 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800227 target: {
228 darwin: {
229 enabled: false,
230 },
Alex Light55a9bad2019-01-29 18:34:09 -0800231 linux_bionic: {
232 enabled: true,
233 multilib: {
234 both: {
235 native_shared_libs: bionic_native_shared_libs,
236 binaries: bionic_binaries_both,
237 }
238 }
239 },
Alex Lighte3521522018-12-06 22:51:18 -0800240 },
Alex Lightda948ce2018-12-06 17:05:41 +0000241}
Jiyong Park1410e9f2019-02-02 04:18:23 +0000242
243python_binary_host {
244 name: "art-apex-tester",
245 srcs: ["art_apex_test.py"],
246 main: "art_apex_test.py",
247 version: {
248 py2: {
249 enabled: false,
250 },
251 py3: {
252 enabled: true,
253 },
254 },
255}
256
257// Genrules so we can run the checker, and empty Java library so that it gets executed.
258
259genrule {
260 name: "art-check-release-apex-gen",
261 srcs: [":com.android.runtime.release"],
262 tools: [
263 "art-apex-tester",
264 "debugfs",
265 ],
266 cmd: "$(location art-apex-tester)"
267 + " --debugfs $(location debugfs)"
268 + " --tmpdir $(genDir)"
269 + " $(in)"
270 + " && touch $(out)",
271 out: ["art-check-release-apex-gen.dummy"],
272}
273cc_prebuilt_binary {
274 name: "art-check-release-apex-gen-fakebin",
275 srcs: [":art-check-release-apex-gen"],
276 host_supported: true,
277 device_supported: false,
278 target: {
279 darwin: {
280 enabled: false, // No python3.
281 },
282 },
283}
284
285genrule {
286 name: "art-check-debug-apex-gen",
287 srcs: [":com.android.runtime.debug"],
288 tools: [
289 "art-apex-tester",
290 "debugfs",
291 ],
292 cmd: "$(location art-apex-tester)"
293 + " --debugfs $(location debugfs)"
294 + " --tmpdir $(genDir)"
295 + " --debug"
296 + " $(in)"
297 + " && touch $(out)",
298 out: ["art-check-debug-apex-gen.dummy"],
299}
300cc_prebuilt_binary {
301 name: "art-check-debug-apex-gen-fakebin",
302 srcs: [":art-check-debug-apex-gen"],
303 host_supported: true,
304 device_supported: false,
305 target: {
306 darwin: {
307 enabled: false, // No python3.
308 },
309 },
310}