blob: 4a6637b3b14b190b89a91af24e840fd09b8d4f56 [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
Roland Levillain38a938e2018-09-21 10:55:51 +0100106apex_key {
107 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +0900108 public_key: "com.android.runtime.avbpubkey",
109 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +0100110}
111
Roland Levillain3be7afe2018-12-04 19:35:03 +0000112prebuilt_etc {
113 name: "com.android.runtime.ld.config.txt",
114 src: "ld.config.txt",
115 filename: "ld.config.txt",
116 installable: false,
117}
118
Roland Levillain53058802018-11-14 17:32:18 +0000119// TODO: Introduce `apex_defaults` to factor common parts of `apex`
120// module definitions below?
121
122// Release version of the Runtime APEX module (not containing debug
123// variants nor tools), included in user builds. Also used for
124// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +0100125apex {
Roland Levillain53058802018-11-14 17:32:18 +0000126 name: "com.android.runtime.release",
127 compile_multilib: "both",
128 manifest: "manifest.json",
Nicolas Geoffraycc64d082019-01-25 09:43:18 +0000129 java_libs: libcore_target_java_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000130 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000131 + bionic_native_shared_libs
132 + libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000133 multilib: {
134 both: {
135 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
136 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900137 binaries: art_runtime_base_binaries_both
138 + bionic_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000139 },
140 prefer32: {
141 binaries: art_runtime_base_binaries_prefer32,
142 },
143 first: {
144 binaries: [],
145 }
146 },
Neil Fuller5ab4a562018-12-11 20:33:46 +0000147 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000148 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000149 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000150}
151
152// "Debug" version of the Runtime APEX module (containing both release and
153// debug variants, as well as additional tools), included in userdebug and
154// eng build.
155apex {
156 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100157 compile_multilib: "both",
158 manifest: "manifest.json",
Nicolas Geoffraycc64d082019-01-25 09:43:18 +0000159 java_libs: libcore_target_java_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100160 native_shared_libs: art_runtime_base_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900161 + art_runtime_debug_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000162 + bionic_native_shared_libs
163 + libcore_native_shared_libs
164 + libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100165 multilib: {
166 both: {
167 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
168 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900169 binaries: art_runtime_base_binaries_both
170 + bionic_binaries_both,
Roland Levillain38a938e2018-09-21 10:55:51 +0100171 },
172 prefer32: {
173 binaries: art_runtime_base_binaries_prefer32
Alex Light572a0962019-01-18 14:48:37 -0800174 + art_runtime_debug_binaries_prefer32
175 + art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100176 },
177 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000178 binaries: art_tools_device_binaries,
Roland Levillain38a938e2018-09-21 10:55:51 +0100179 }
180 },
Neil Fuller5ab4a562018-12-11 20:33:46 +0000181 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000182 + ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100183 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100184}
Alex Lightda948ce2018-12-06 17:05:41 +0000185
186// TODO: Do this better. art_apex will disable host builds when
187// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
188// because binaries have different multilib classes and 'multilib: {}' isn't
189// supported by target: { ... }.
190// See b/120617876 for more information.
191art_apex {
192 name: "com.android.runtime.host",
193 compile_multilib: "both",
194 payload_type: "zip",
195 host_supported: true,
196 device_supported: false,
197 manifest: "manifest.json",
Alex Lighta6ea6022019-01-29 11:02:03 -0800198 java_libs: libcore_target_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800199 ignore_system_library_special_case: true,
Alex Lightda948ce2018-12-06 17:05:41 +0000200 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000201 + art_runtime_debug_native_shared_libs
202 + libcore_native_shared_libs
203 + libcore_debug_native_shared_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000204 multilib: {
205 both: {
206 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
207 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Alex Light572a0962019-01-18 14:48:37 -0800208 binaries: art_runtime_base_binaries_both
209 + art_runtime_debug_binaries_both_host,
Alex Lightda948ce2018-12-06 17:05:41 +0000210 },
211 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000212 binaries: art_tools_host_binaries
Alex Lightda948ce2018-12-06 17:05:41 +0000213 + art_runtime_base_binaries_prefer32
214 + art_runtime_debug_binaries_prefer32,
215 }
216 },
217 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800218 target: {
219 darwin: {
220 enabled: false,
221 },
Alex Light55a9bad2019-01-29 18:34:09 -0800222 linux_bionic: {
223 enabled: true,
224 multilib: {
225 both: {
226 native_shared_libs: bionic_native_shared_libs,
227 binaries: bionic_binaries_both,
228 }
229 }
230 },
Alex Lighte3521522018-12-06 22:51:18 -0800231 },
Alex Lightda948ce2018-12-06 17:05:41 +0000232}