blob: 431605e67d95d1cd7a9425692ff6c7920a2c5281 [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]
Jiyong Parke2bc9fe2018-12-26 11:36:39 +090028bionic_binaries_both = [
29 "linker",
30]
Roland Levillain38a938e2018-09-21 10:55:51 +010031// - Fake library that avoids namespace issues and gives some warnings for nosy apps.
32art_runtime_fake_native_shared_libs = [
33 // FIXME: Does not work as-is, because `libart_fake` is defined in libart_fake/Android.mk,
34 // and because a module defined in a Blueprint file cannot depend on a module defined in a
35 // Makefile. To support `libart_fake` as a dependency of this APEX module, we can either
36 // (probably in that order of preference):
37 // a. translate that logic into Blueprint; or
38 // b. write the whole Android Runtime APEX generation logic in Android.mk; or
39 // c. introduce an `art_apex` module type extending the `apex` module type and write the
40 // corresponding Go logic to handle this extra dependency.
41 //"libart_fake",
42]
43// - Debug variants (binaries for which a 32-bit version is preferred).
Roland Levillain38a938e2018-09-21 10:55:51 +010044art_runtime_debug_binaries_prefer32 = [
45 "dex2oatd",
46 "dexoptanalyzerd",
47 "profmand",
48]
49art_runtime_debug_native_shared_libs = [
50 "libartd",
51 "libartd-compiler",
52 "libopenjdkd",
53 "libopenjdkjvmd",
54 "libopenjdkjvmtid",
55 "libadbconnectiond",
Jiyong Park72b85332018-12-28 17:20:55 +090056 "libjavacrypto",
Roland Levillain38a938e2018-09-21 10:55:51 +010057]
58
Neil Fullera91d6542018-12-11 20:11:22 +000059// Files associated with bionic / managed core library time zone APIs.
60art_runtime_time_zone_prebuilts = [
Neil Fullera886dab2018-12-06 15:12:52 +000061 "apex_tz_version",
62 "apex_tzdata",
63 "apex_tzlookup.xml",
64]
65
Roland Levillain38a938e2018-09-21 10:55:51 +010066// Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Alex Lightda948ce2018-12-06 17:05:41 +000067art_tools_common_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010068 "dexdiag",
69 "dexdump",
70 "dexlist",
Alex Lightda948ce2018-12-06 17:05:41 +000071]
72
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000073// Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
74art_tools_device_only_binaries = [
75 // oatdump cannot link with host linux_bionic due to not using clang lld;
76 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +010077 "oatdump",
78]
79
80// Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000081art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010082 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
83 // (same issue as for `libart_fake` above).
84 //"ahat",
85 "hprof-conv",
86 // ...
87]
88
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000089art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries
90art_tools_host_binaries = art_tools_common_binaries + art_tools_host_only_binaries
Alex Lightda948ce2018-12-06 17:05:41 +000091
Roland Levillain38a938e2018-09-21 10:55:51 +010092apex_key {
93 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +090094 public_key: "com.android.runtime.avbpubkey",
95 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +010096}
97
Roland Levillain3be7afe2018-12-04 19:35:03 +000098prebuilt_etc {
99 name: "com.android.runtime.ld.config.txt",
100 src: "ld.config.txt",
101 filename: "ld.config.txt",
102 installable: false,
103}
104
Roland Levillain53058802018-11-14 17:32:18 +0000105// TODO: Introduce `apex_defaults` to factor common parts of `apex`
106// module definitions below?
107
108// Release version of the Runtime APEX module (not containing debug
109// variants nor tools), included in user builds. Also used for
110// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +0100111apex {
Roland Levillain53058802018-11-14 17:32:18 +0000112 name: "com.android.runtime.release",
113 compile_multilib: "both",
114 manifest: "manifest.json",
115 native_shared_libs: art_runtime_base_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900116 + art_runtime_fake_native_shared_libs
117 + bionic_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000118 multilib: {
119 both: {
120 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
121 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900122 binaries: art_runtime_base_binaries_both
123 + bionic_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000124 },
125 prefer32: {
126 binaries: art_runtime_base_binaries_prefer32,
127 },
128 first: {
129 binaries: [],
130 }
131 },
Neil Fullera91d6542018-12-11 20:11:22 +0000132 prebuilts: art_runtime_time_zone_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000133 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000134 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000135}
136
137// "Debug" version of the Runtime APEX module (containing both release and
138// debug variants, as well as additional tools), included in userdebug and
139// eng build.
140apex {
141 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100142 compile_multilib: "both",
143 manifest: "manifest.json",
Roland Levillain38a938e2018-09-21 10:55:51 +0100144 native_shared_libs: art_runtime_base_native_shared_libs
145 + art_runtime_fake_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900146 + art_runtime_debug_native_shared_libs
147 + bionic_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100148 multilib: {
149 both: {
150 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
151 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900152 binaries: art_runtime_base_binaries_both
153 + bionic_binaries_both,
Roland Levillain38a938e2018-09-21 10:55:51 +0100154 },
155 prefer32: {
156 binaries: art_runtime_base_binaries_prefer32
Roland Levillain53058802018-11-14 17:32:18 +0000157 + art_runtime_debug_binaries_prefer32,
Roland Levillain38a938e2018-09-21 10:55:51 +0100158 },
159 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000160 binaries: art_tools_device_binaries,
Roland Levillain38a938e2018-09-21 10:55:51 +0100161 }
162 },
Neil Fullera91d6542018-12-11 20:11:22 +0000163 prebuilts: art_runtime_time_zone_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000164 + ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100165 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100166}
Alex Lightda948ce2018-12-06 17:05:41 +0000167
168// TODO: Do this better. art_apex will disable host builds when
169// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
170// because binaries have different multilib classes and 'multilib: {}' isn't
171// supported by target: { ... }.
172// See b/120617876 for more information.
173art_apex {
174 name: "com.android.runtime.host",
175 compile_multilib: "both",
176 payload_type: "zip",
177 host_supported: true,
178 device_supported: false,
179 manifest: "manifest.json",
180 native_shared_libs: art_runtime_base_native_shared_libs
181 + art_runtime_fake_native_shared_libs
182 + art_runtime_debug_native_shared_libs,
183 multilib: {
184 both: {
185 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
186 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
187 binaries: art_runtime_base_binaries_both,
188 },
189 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000190 binaries: art_tools_host_binaries
Alex Lightda948ce2018-12-06 17:05:41 +0000191 + art_runtime_base_binaries_prefer32
192 + art_runtime_debug_binaries_prefer32,
193 }
194 },
195 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800196 target: {
197 darwin: {
198 enabled: false,
199 },
200 },
Alex Lightda948ce2018-12-06 17:05:41 +0000201}