blob: 0ec0a15e9e0c65b9054b558ae6c18835eefafd29 [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",
20 "libadbconnection",
21]
Jiyong Park3296fb12018-12-13 18:32:21 +090022bionic_native_shared_libs = [
23 "libc",
24 "libm",
25 "libdl",
26]
Roland Levillain38a938e2018-09-21 10:55:51 +010027// - Fake library that avoids namespace issues and gives some warnings for nosy apps.
28art_runtime_fake_native_shared_libs = [
29 // FIXME: Does not work as-is, because `libart_fake` is defined in libart_fake/Android.mk,
30 // and because a module defined in a Blueprint file cannot depend on a module defined in a
31 // Makefile. To support `libart_fake` as a dependency of this APEX module, we can either
32 // (probably in that order of preference):
33 // a. translate that logic into Blueprint; or
34 // b. write the whole Android Runtime APEX generation logic in Android.mk; or
35 // c. introduce an `art_apex` module type extending the `apex` module type and write the
36 // corresponding Go logic to handle this extra dependency.
37 //"libart_fake",
38]
39// - Debug variants (binaries for which a 32-bit version is preferred).
40// FIXME: These modules are optional (the built product can decide to include them or not).
41// Should they be moved to another APEX file?
42art_runtime_debug_binaries_prefer32 = [
43 "dex2oatd",
44 "dexoptanalyzerd",
45 "profmand",
46]
47art_runtime_debug_native_shared_libs = [
48 "libartd",
49 "libartd-compiler",
50 "libopenjdkd",
51 "libopenjdkjvmd",
52 "libopenjdkjvmtid",
53 "libadbconnectiond",
54]
55
Neil Fullera91d6542018-12-11 20:11:22 +000056// Files associated with bionic / managed core library time zone APIs.
57art_runtime_time_zone_prebuilts = [
Neil Fullera886dab2018-12-06 15:12:52 +000058 "apex_tz_version",
59 "apex_tzdata",
60 "apex_tzlookup.xml",
61]
62
Roland Levillain38a938e2018-09-21 10:55:51 +010063// Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000064art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010065 "dexdiag",
66 "dexdump",
67 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000068]
69
70art_tools_device_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010071 "oatdump",
72]
73
74// Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
75// TODO: Include these modules in the future "host APEX".
76art_tools_host_binaries = [
77 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
78 // (same issue as for `libart_fake` above).
79 //"ahat",
80 "hprof-conv",
81 // ...
82]
83
Alex Lightda948ce2018-12-06 17:05:41 +000084art_tools_binaries = art_tools_common_binaries + art_tools_device_binaries
85
Roland Levillain38a938e2018-09-21 10:55:51 +010086apex_key {
87 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +090088 public_key: "com.android.runtime.avbpubkey",
89 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +010090}
91
Roland Levillain3be7afe2018-12-04 19:35:03 +000092prebuilt_etc {
93 name: "com.android.runtime.ld.config.txt",
94 src: "ld.config.txt",
95 filename: "ld.config.txt",
96 installable: false,
97}
98
Roland Levillain53058802018-11-14 17:32:18 +000099// TODO: Introduce `apex_defaults` to factor common parts of `apex`
100// module definitions below?
101
102// Release version of the Runtime APEX module (not containing debug
103// variants nor tools), included in user builds. Also used for
104// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +0100105apex {
Roland Levillain53058802018-11-14 17:32:18 +0000106 name: "com.android.runtime.release",
107 compile_multilib: "both",
108 manifest: "manifest.json",
109 native_shared_libs: art_runtime_base_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900110 + art_runtime_fake_native_shared_libs
111 + bionic_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000112 multilib: {
113 both: {
114 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
115 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
116 binaries: art_runtime_base_binaries_both,
117 },
118 prefer32: {
119 binaries: art_runtime_base_binaries_prefer32,
120 },
121 first: {
122 binaries: [],
123 }
124 },
Neil Fullera91d6542018-12-11 20:11:22 +0000125 prebuilts: art_runtime_time_zone_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000126 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000127 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000128}
129
130// "Debug" version of the Runtime APEX module (containing both release and
131// debug variants, as well as additional tools), included in userdebug and
132// eng build.
133apex {
134 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100135 compile_multilib: "both",
136 manifest: "manifest.json",
Roland Levillain38a938e2018-09-21 10:55:51 +0100137 native_shared_libs: art_runtime_base_native_shared_libs
138 + art_runtime_fake_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900139 + art_runtime_debug_native_shared_libs
140 + bionic_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100141 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).
145 binaries: art_runtime_base_binaries_both,
146 },
147 prefer32: {
148 binaries: art_runtime_base_binaries_prefer32
Roland Levillain53058802018-11-14 17:32:18 +0000149 + art_runtime_debug_binaries_prefer32,
Roland Levillain38a938e2018-09-21 10:55:51 +0100150 },
151 first: {
152 binaries: art_tools_binaries,
153 }
154 },
Neil Fullera91d6542018-12-11 20:11:22 +0000155 prebuilts: art_runtime_time_zone_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000156 + ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100157 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100158}
Alex Lightda948ce2018-12-06 17:05:41 +0000159
160// TODO: Do this better. art_apex will disable host builds when
161// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
162// because binaries have different multilib classes and 'multilib: {}' isn't
163// supported by target: { ... }.
164// See b/120617876 for more information.
165art_apex {
166 name: "com.android.runtime.host",
167 compile_multilib: "both",
168 payload_type: "zip",
169 host_supported: true,
170 device_supported: false,
171 manifest: "manifest.json",
172 native_shared_libs: art_runtime_base_native_shared_libs
173 + art_runtime_fake_native_shared_libs
174 + art_runtime_debug_native_shared_libs,
175 multilib: {
176 both: {
177 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
178 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
179 binaries: art_runtime_base_binaries_both,
180 },
181 first: {
182 // TODO: oatdump cannot link with host linux_bionic due to not using clang ld
183 binaries: art_tools_common_binaries
184 + art_runtime_base_binaries_prefer32
185 + art_runtime_debug_binaries_prefer32,
186 }
187 },
188 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800189 target: {
190 darwin: {
191 enabled: false,
192 },
193 },
Alex Lightda948ce2018-12-06 17:05:41 +0000194}