blob: f1a21e8428b43a4229ed1c232e7eeb04896a5d13 [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]
22// - Fake library that avoids namespace issues and gives some warnings for nosy apps.
23art_runtime_fake_native_shared_libs = [
24 // FIXME: Does not work as-is, because `libart_fake` is defined in libart_fake/Android.mk,
25 // and because a module defined in a Blueprint file cannot depend on a module defined in a
26 // Makefile. To support `libart_fake` as a dependency of this APEX module, we can either
27 // (probably in that order of preference):
28 // a. translate that logic into Blueprint; or
29 // b. write the whole Android Runtime APEX generation logic in Android.mk; or
30 // c. introduce an `art_apex` module type extending the `apex` module type and write the
31 // corresponding Go logic to handle this extra dependency.
32 //"libart_fake",
33]
34// - Debug variants (binaries for which a 32-bit version is preferred).
35// FIXME: These modules are optional (the built product can decide to include them or not).
36// Should they be moved to another APEX file?
37art_runtime_debug_binaries_prefer32 = [
38 "dex2oatd",
39 "dexoptanalyzerd",
40 "profmand",
41]
42art_runtime_debug_native_shared_libs = [
43 "libartd",
44 "libartd-compiler",
45 "libopenjdkd",
46 "libopenjdkjvmd",
47 "libopenjdkjvmtid",
48 "libadbconnectiond",
49]
50
51// Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
Nicolas Geoffray1047f1a2018-12-06 09:05:53 +000052art_tools_binaries = [
Roland Levillain38a938e2018-09-21 10:55:51 +010053 "dexdiag",
54 "dexdump",
55 "dexlist",
56 "oatdump",
57]
58
59// Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk.
60// TODO: Include these modules in the future "host APEX".
61art_tools_host_binaries = [
62 // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk
63 // (same issue as for `libart_fake` above).
64 //"ahat",
65 "hprof-conv",
66 // ...
67]
68
69apex_key {
70 name: "com.android.runtime.key",
Jiyong Park11a2df32018-11-22 16:25:08 +090071 public_key: "com.android.runtime.avbpubkey",
72 private_key: "com.android.runtime.pem",
Roland Levillain38a938e2018-09-21 10:55:51 +010073}
74
Roland Levillain3be7afe2018-12-04 19:35:03 +000075prebuilt_etc {
76 name: "com.android.runtime.ld.config.txt",
77 src: "ld.config.txt",
78 filename: "ld.config.txt",
79 installable: false,
80}
81
Roland Levillain53058802018-11-14 17:32:18 +000082// TODO: Introduce `apex_defaults` to factor common parts of `apex`
83// module definitions below?
84
85// Release version of the Runtime APEX module (not containing debug
86// variants nor tools), included in user builds. Also used for
87// storage-constrained devices in userdebug and eng builds.
Roland Levillain38a938e2018-09-21 10:55:51 +010088apex {
Roland Levillain53058802018-11-14 17:32:18 +000089 name: "com.android.runtime.release",
90 compile_multilib: "both",
91 manifest: "manifest.json",
92 native_shared_libs: art_runtime_base_native_shared_libs
93 + art_runtime_fake_native_shared_libs,
94 multilib: {
95 both: {
96 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
97 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
98 binaries: art_runtime_base_binaries_both,
99 },
100 prefer32: {
101 binaries: art_runtime_base_binaries_prefer32,
102 },
103 first: {
104 binaries: [],
105 }
106 },
Roland Levillain3be7afe2018-12-04 19:35:03 +0000107 prebuilts: ["com.android.runtime.ld.config.txt"],
Roland Levillain53058802018-11-14 17:32:18 +0000108 key: "com.android.runtime.key",
Roland Levillain53058802018-11-14 17:32:18 +0000109}
110
111// "Debug" version of the Runtime APEX module (containing both release and
112// debug variants, as well as additional tools), included in userdebug and
113// eng build.
114apex {
115 name: "com.android.runtime.debug",
Roland Levillain38a938e2018-09-21 10:55:51 +0100116 compile_multilib: "both",
117 manifest: "manifest.json",
Roland Levillain38a938e2018-09-21 10:55:51 +0100118 native_shared_libs: art_runtime_base_native_shared_libs
119 + art_runtime_fake_native_shared_libs
120 + art_runtime_debug_native_shared_libs,
121 multilib: {
122 both: {
123 // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
124 // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
125 binaries: art_runtime_base_binaries_both,
126 },
127 prefer32: {
128 binaries: art_runtime_base_binaries_prefer32
Roland Levillain53058802018-11-14 17:32:18 +0000129 + art_runtime_debug_binaries_prefer32,
Roland Levillain38a938e2018-09-21 10:55:51 +0100130 },
131 first: {
132 binaries: art_tools_binaries,
133 }
134 },
Roland Levillain3be7afe2018-12-04 19:35:03 +0000135 prebuilts: ["com.android.runtime.ld.config.txt"],
Roland Levillain38a938e2018-09-21 10:55:51 +0100136 key: "com.android.runtime.key",
Roland Levillain38a938e2018-09-21 10:55:51 +0100137}