blob: 2095a688eb14c77e4641c3d66631bbd5e8e92369 [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",
Jiyong Park72b85332018-12-28 17:20:55 +090021 "libjavacrypto",
Roland Levillain38a938e2018-09-21 10:55:51 +010022]
Jiyong Park3296fb12018-12-13 18:32:21 +090023bionic_native_shared_libs = [
24 "libc",
25 "libm",
26 "libdl",
27]
Roland Levillain38a938e2018-09-21 10:55:51 +010028// - Fake library that avoids namespace issues and gives some warnings for nosy apps.
29art_runtime_fake_native_shared_libs = [
30 // FIXME: Does not work as-is, because `libart_fake` is defined in libart_fake/Android.mk,
31 // and because a module defined in a Blueprint file cannot depend on a module defined in a
32 // Makefile. To support `libart_fake` as a dependency of this APEX module, we can either
33 // (probably in that order of preference):
34 // a. translate that logic into Blueprint; or
35 // b. write the whole Android Runtime APEX generation logic in Android.mk; or
36 // c. introduce an `art_apex` module type extending the `apex` module type and write the
37 // corresponding Go logic to handle this extra dependency.
38 //"libart_fake",
39]
40// - Debug variants (binaries for which a 32-bit version is preferred).
41// FIXME: These modules are optional (the built product can decide to include them or not).
42// Should they be moved to another APEX file?
43art_runtime_debug_binaries_prefer32 = [
44 "dex2oatd",
45 "dexoptanalyzerd",
46 "profmand",
47]
48art_runtime_debug_native_shared_libs = [
49 "libartd",
50 "libartd-compiler",
51 "libopenjdkd",
52 "libopenjdkjvmd",
53 "libopenjdkjvmtid",
54 "libadbconnectiond",
Jiyong Park72b85332018-12-28 17:20:55 +090055 "libjavacrypto",
Roland Levillain38a938e2018-09-21 10:55:51 +010056]
57
Neil Fullera91d6542018-12-11 20:11:22 +000058// Files associated with bionic / managed core library time zone APIs.
59art_runtime_time_zone_prebuilts = [
Neil Fullera886dab2018-12-06 15:12:52 +000060 "apex_tz_version",
61 "apex_tzdata",
62 "apex_tzlookup.xml",
63]
64
Roland Levillain38a938e2018-09-21 10:55:51 +010065// Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000066art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010067 "dexdiag",
68 "dexdump",
69 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000070]
71
72art_tools_device_binaries = [
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.
77// TODO: Include these modules in the future "host APEX".
78art_tools_host_binaries = [
79 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
80 // (same issue as for `libart_fake` above).
81 //"ahat",
82 "hprof-conv",
83 // ...
84]
85
Alex Lightda948ce2018-12-06 17:05:41 +000086art_tools_binaries = art_tools_common_binaries + art_tools_device_binaries
87
Roland Levillain38a938e2018-09-21 10:55:51 +010088apex_key {
89 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +090090 public_key: "com.android.runtime.avbpubkey",
91 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +010092}
93
Roland Levillain3be7afe2018-12-04 19:35:03 +000094prebuilt_etc {
95 name: "com.android.runtime.ld.config.txt",
96 src: "ld.config.txt",
97 filename: "ld.config.txt",
98 installable: false,
99}
100
Roland Levillain53058802018-11-14 17:32:18 +0000101// TODO: Introduce `apex_defaults` to factor common parts of `apex`
102// module definitions below?
103
104// Release version of the Runtime APEX module (not containing debug
105// variants nor tools), included in user builds. Also used for
106// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +0100107apex {
Roland Levillain53058802018-11-14 17:32:18 +0000108 name: "com.android.runtime.release",
109 compile_multilib: "both",
110 manifest: "manifest.json",
111 native_shared_libs: art_runtime_base_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900112 + art_runtime_fake_native_shared_libs
113 + bionic_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000114 multilib: {
115 both: {
116 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
117 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
118 binaries: art_runtime_base_binaries_both,
119 },
120 prefer32: {
121 binaries: art_runtime_base_binaries_prefer32,
122 },
123 first: {
124 binaries: [],
125 }
126 },
Neil Fullera91d6542018-12-11 20:11:22 +0000127 prebuilts: art_runtime_time_zone_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000128 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000129 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000130}
131
132// "Debug" version of the Runtime APEX module (containing both release and
133// debug variants, as well as additional tools), included in userdebug and
134// eng build.
135apex {
136 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100137 compile_multilib: "both",
138 manifest: "manifest.json",
Roland Levillain38a938e2018-09-21 10:55:51 +0100139 native_shared_libs: art_runtime_base_native_shared_libs
140 + art_runtime_fake_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900141 + art_runtime_debug_native_shared_libs
142 + bionic_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100143 multilib: {
144 both: {
145 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
146 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
147 binaries: art_runtime_base_binaries_both,
148 },
149 prefer32: {
150 binaries: art_runtime_base_binaries_prefer32
Roland Levillain53058802018-11-14 17:32:18 +0000151 + art_runtime_debug_binaries_prefer32,
Roland Levillain38a938e2018-09-21 10:55:51 +0100152 },
153 first: {
154 binaries: art_tools_binaries,
155 }
156 },
Neil Fullera91d6542018-12-11 20:11:22 +0000157 prebuilts: art_runtime_time_zone_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000158 + ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100159 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100160}
Alex Lightda948ce2018-12-06 17:05:41 +0000161
162// TODO: Do this better. art_apex will disable host builds when
163// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
164// because binaries have different multilib classes and 'multilib: {}' isn't
165// supported by target: { ... }.
166// See b/120617876 for more information.
167art_apex {
168 name: "com.android.runtime.host",
169 compile_multilib: "both",
170 payload_type: "zip",
171 host_supported: true,
172 device_supported: false,
173 manifest: "manifest.json",
174 native_shared_libs: art_runtime_base_native_shared_libs
175 + art_runtime_fake_native_shared_libs
176 + art_runtime_debug_native_shared_libs,
177 multilib: {
178 both: {
179 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
180 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
181 binaries: art_runtime_base_binaries_both,
182 },
183 first: {
184 // TODO: oatdump cannot link with host linux_bionic due to not using clang ld
185 binaries: art_tools_common_binaries
186 + art_runtime_base_binaries_prefer32
187 + art_runtime_debug_binaries_prefer32,
188 }
189 },
190 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800191 target: {
192 darwin: {
193 enabled: false,
194 },
195 },
Alex Lightda948ce2018-12-06 17:05:41 +0000196}