blob: 47a1e4b05730e99312e7a0d2f174aed110c37020 [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 = [
Martin Stjernholm23b27042019-01-11 10:36:35 +000016 "libadbconnection",
Roland Levillain38a938e2018-09-21 10:55:51 +010017 "libart",
18 "libart-compiler",
Martin Stjernholm23b27042019-01-11 10:36:35 +000019 "libdexfile_external",
Roland Levillain38a938e2018-09-21 10:55:51 +010020 "libopenjdkjvm",
21 "libopenjdkjvmti",
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// - Debug variants (binaries for which a 32-bit version is preferred).
Roland Levillain38a938e2018-09-21 10:55:51 +010032art_runtime_debug_binaries_prefer32 = [
Roland Levillain38a938e2018-09-21 10:55:51 +010033 "dexoptanalyzerd",
34 "profmand",
35]
Alex Light572a0962019-01-18 14:48:37 -080036art_runtime_debug_binaries_prefer32_device = [
37 "dex2oatd",
38]
39art_runtime_debug_binaries_both_host = [
40 "dex2oatd",
41]
42
Roland Levillaincb82d092018-11-02 18:50:15 +000043// - Debug variants (libraries).
Roland Levillain38a938e2018-09-21 10:55:51 +010044art_runtime_debug_native_shared_libs = [
Martin Stjernholm23b27042019-01-11 10:36:35 +000045 "libadbconnectiond",
Roland Levillain38a938e2018-09-21 10:55:51 +010046 "libartd",
47 "libartd-compiler",
Roland Levillain38a938e2018-09-21 10:55:51 +010048 "libopenjdkjvmd",
49 "libopenjdkjvmtid",
Roland Levillain38a938e2018-09-21 10:55:51 +010050]
Roland Levillaincb82d092018-11-02 18:50:15 +000051libcore_debug_native_shared_libs = [
52 "libopenjdkd",
53]
Roland Levillain38a938e2018-09-21 10:55:51 +010054
Neil Fuller5ab4a562018-12-11 20:33:46 +000055// Data files associated with bionic / managed core library APIs.
56art_runtime_data_file_prebuilts = [
Neil Fullera886dab2018-12-06 15:12:52 +000057 "apex_tz_version",
58 "apex_tzdata",
59 "apex_tzlookup.xml",
Neil Fuller5ab4a562018-12-11 20:33:46 +000060 "apex_icu.dat",
Neil Fullera886dab2018-12-06 15:12:52 +000061]
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
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000070// Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
71art_tools_device_only_binaries = [
72 // oatdump cannot link with host linux_bionic due to not using clang lld;
73 // TODO: Make it work with clang lld.
Roland Levillain38a938e2018-09-21 10:55:51 +010074 "oatdump",
75]
76
77// Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000078art_tools_host_only_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010079 // 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
Roland Levillaine9f0ccc2019-01-07 16:45:58 +000086art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries
87art_tools_host_binaries = art_tools_common_binaries + art_tools_host_only_binaries
Alex Lightda948ce2018-12-06 17:05:41 +000088
Pete Bentley51ffdbe2019-01-11 15:25:40 +000089// Libcore native libraries.
Roland Levillaincb82d092018-11-02 18:50:15 +000090libcore_native_shared_libs = [
Pete Bentley51ffdbe2019-01-11 15:25:40 +000091 "libjavacore",
Roland Levillaincb82d092018-11-02 18:50:15 +000092 "libopenjdk",
Pete Bentley51ffdbe2019-01-11 15:25:40 +000093 "libexpat",
94 "libz",
95 "libziparchive"
Roland Levillaincb82d092018-11-02 18:50:15 +000096]
97
Nicolas Geoffraycc64d082019-01-25 09:43:18 +000098// Java libraries
99libcore_target_java_libs = [
100 "core-oj",
101 "core-libart",
102 "okhttp",
103 "bouncycastle",
104 "apache-xml",
105]
106
Roland Levillain38a938e2018-09-21 10:55:51 +0100107apex_key {
108 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +0900109 public_key: "com.android.runtime.avbpubkey",
110 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +0100111}
112
Roland Levillain3be7afe2018-12-04 19:35:03 +0000113prebuilt_etc {
114 name: "com.android.runtime.ld.config.txt",
115 src: "ld.config.txt",
116 filename: "ld.config.txt",
117 installable: false,
118}
119
Roland Levillain53058802018-11-14 17:32:18 +0000120// TODO: Introduce `apex_defaults` to factor common parts of `apex`
121// module definitions below?
122
123// Release version of the Runtime APEX module (not containing debug
124// variants nor tools), included in user builds. Also used for
125// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +0100126apex {
Roland Levillain53058802018-11-14 17:32:18 +0000127 name: "com.android.runtime.release",
128 compile_multilib: "both",
129 manifest: "manifest.json",
Nicolas Geoffraycc64d082019-01-25 09:43:18 +0000130 java_libs: libcore_target_java_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000131 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000132 + bionic_native_shared_libs
133 + libcore_native_shared_libs,
Roland Levillain53058802018-11-14 17:32:18 +0000134 multilib: {
135 both: {
136 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
137 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900138 binaries: art_runtime_base_binaries_both
139 + bionic_binaries_both,
Roland Levillain53058802018-11-14 17:32:18 +0000140 },
141 prefer32: {
142 binaries: art_runtime_base_binaries_prefer32,
143 },
144 first: {
145 binaries: [],
146 }
147 },
Neil Fuller5ab4a562018-12-11 20:33:46 +0000148 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000149 + ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000150 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000151}
152
153// "Debug" version of the Runtime APEX module (containing both release and
154// debug variants, as well as additional tools), included in userdebug and
155// eng build.
156apex {
157 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100158 compile_multilib: "both",
159 manifest: "manifest.json",
Nicolas Geoffraycc64d082019-01-25 09:43:18 +0000160 java_libs: libcore_target_java_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100161 native_shared_libs: art_runtime_base_native_shared_libs
Jiyong Park3296fb12018-12-13 18:32:21 +0900162 + art_runtime_debug_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000163 + bionic_native_shared_libs
164 + libcore_native_shared_libs
165 + libcore_debug_native_shared_libs,
Roland Levillain38a938e2018-09-21 10:55:51 +0100166 multilib: {
167 both: {
168 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
169 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Jiyong Parke2bc9fe2018-12-26 11:36:39 +0900170 binaries: art_runtime_base_binaries_both
171 + bionic_binaries_both,
Roland Levillain38a938e2018-09-21 10:55:51 +0100172 },
173 prefer32: {
174 binaries: art_runtime_base_binaries_prefer32
Alex Light572a0962019-01-18 14:48:37 -0800175 + art_runtime_debug_binaries_prefer32
176 + art_runtime_debug_binaries_prefer32_device,
Roland Levillain38a938e2018-09-21 10:55:51 +0100177 },
178 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000179 binaries: art_tools_device_binaries,
Roland Levillain38a938e2018-09-21 10:55:51 +0100180 }
181 },
Neil Fuller5ab4a562018-12-11 20:33:46 +0000182 prebuilts: art_runtime_data_file_prebuilts
Neil Fullera886dab2018-12-06 15:12:52 +0000183 + ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100184 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100185}
Alex Lightda948ce2018-12-06 17:05:41 +0000186
187// TODO: Do this better. art_apex will disable host builds when
188// HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug
189// because binaries have different multilib classes and 'multilib: {}' isn't
190// supported by target: { ... }.
191// See b/120617876 for more information.
192art_apex {
193 name: "com.android.runtime.host",
194 compile_multilib: "both",
195 payload_type: "zip",
196 host_supported: true,
197 device_supported: false,
198 manifest: "manifest.json",
Alex Lighta6ea6022019-01-29 11:02:03 -0800199 java_libs: libcore_target_java_libs,
Alex Light55a9bad2019-01-29 18:34:09 -0800200 ignore_system_library_special_case: true,
Alex Lightda948ce2018-12-06 17:05:41 +0000201 native_shared_libs: art_runtime_base_native_shared_libs
Roland Levillaincb82d092018-11-02 18:50:15 +0000202 + art_runtime_debug_native_shared_libs
203 + libcore_native_shared_libs
204 + libcore_debug_native_shared_libs,
Alex Lightda948ce2018-12-06 17:05:41 +0000205 multilib: {
206 both: {
207 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
208 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
Alex Light572a0962019-01-18 14:48:37 -0800209 binaries: art_runtime_base_binaries_both
210 + art_runtime_debug_binaries_both_host,
Alex Lightda948ce2018-12-06 17:05:41 +0000211 },
212 first: {
Roland Levillaine9f0ccc2019-01-07 16:45:58 +0000213 binaries: art_tools_host_binaries
Alex Lightda948ce2018-12-06 17:05:41 +0000214 + art_runtime_base_binaries_prefer32
215 + art_runtime_debug_binaries_prefer32,
216 }
217 },
218 key: "com.android.runtime.key",
Alex Lighte3521522018-12-06 22:51:18 -0800219 target: {
220 darwin: {
221 enabled: false,
222 },
Alex Light55a9bad2019-01-29 18:34:09 -0800223 linux_bionic: {
224 enabled: true,
225 multilib: {
226 both: {
227 native_shared_libs: bionic_native_shared_libs,
228 binaries: bionic_binaries_both,
229 }
230 }
231 },
Alex Lighte3521522018-12-06 22:51:18 -0800232 },
Alex Lightda948ce2018-12-06 17:05:41 +0000233}