Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 1 | // 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). |
| 5 | art_runtime_base_binaries_both = [ |
| 6 | "dalvikvm", |
| 7 | ] |
| 8 | // - Base requirements (binaries for which a 32-bit version is preferred). |
| 9 | art_runtime_base_binaries_prefer32 = [ |
| 10 | "dex2oat", |
| 11 | "dexoptanalyzer", |
| 12 | "profman", |
| 13 | ] |
| 14 | // - Base requirements (libraries). |
| 15 | art_runtime_base_native_shared_libs = [ |
| 16 | "libart", |
| 17 | "libart-compiler", |
| 18 | "libopenjdkjvm", |
| 19 | "libopenjdkjvmti", |
| 20 | "libadbconnection", |
Jiyong Park | 72b8533 | 2018-12-28 17:20:55 +0900 | [diff] [blame] | 21 | "libjavacrypto", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 22 | ] |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 23 | bionic_native_shared_libs = [ |
| 24 | "libc", |
| 25 | "libm", |
| 26 | "libdl", |
| 27 | ] |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 28 | bionic_binaries_both = [ |
| 29 | "linker", |
| 30 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 31 | // - Fake library that avoids namespace issues and gives some warnings for nosy apps. |
| 32 | art_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 Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 44 | art_runtime_debug_binaries_prefer32 = [ |
| 45 | "dex2oatd", |
| 46 | "dexoptanalyzerd", |
| 47 | "profmand", |
| 48 | ] |
| 49 | art_runtime_debug_native_shared_libs = [ |
| 50 | "libartd", |
| 51 | "libartd-compiler", |
| 52 | "libopenjdkd", |
| 53 | "libopenjdkjvmd", |
| 54 | "libopenjdkjvmtid", |
| 55 | "libadbconnectiond", |
Jiyong Park | 72b8533 | 2018-12-28 17:20:55 +0900 | [diff] [blame] | 56 | "libjavacrypto", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 57 | ] |
| 58 | |
Neil Fuller | a91d654 | 2018-12-11 20:11:22 +0000 | [diff] [blame] | 59 | // Files associated with bionic / managed core library time zone APIs. |
| 60 | art_runtime_time_zone_prebuilts = [ |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 61 | "apex_tz_version", |
| 62 | "apex_tzdata", |
| 63 | "apex_tzlookup.xml", |
| 64 | ] |
| 65 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 66 | // Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 67 | art_tools_common_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 68 | "dexdiag", |
| 69 | "dexdump", |
| 70 | "dexlist", |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 71 | ] |
| 72 | |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame^] | 73 | // Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
| 74 | art_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 Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 77 | "oatdump", |
| 78 | ] |
| 79 | |
| 80 | // Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame^] | 81 | art_tools_host_only_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 82 | // 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 Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame^] | 89 | art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries |
| 90 | art_tools_host_binaries = art_tools_common_binaries + art_tools_host_only_binaries |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 91 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 92 | apex_key { |
| 93 | name: "com.android.runtime.key", |
Jiyong Park | 11a2df3 | 2018-11-22 16:25:08 +0900 | [diff] [blame] | 94 | public_key: "com.android.runtime.avbpubkey", |
| 95 | private_key: "com.android.runtime.pem", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 96 | } |
| 97 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 98 | prebuilt_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 Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 105 | // 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 Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 111 | apex { |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 112 | name: "com.android.runtime.release", |
| 113 | compile_multilib: "both", |
| 114 | manifest: "manifest.json", |
| 115 | native_shared_libs: art_runtime_base_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 116 | + art_runtime_fake_native_shared_libs |
| 117 | + bionic_native_shared_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 118 | 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 Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 122 | binaries: art_runtime_base_binaries_both |
| 123 | + bionic_binaries_both, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 124 | }, |
| 125 | prefer32: { |
| 126 | binaries: art_runtime_base_binaries_prefer32, |
| 127 | }, |
| 128 | first: { |
| 129 | binaries: [], |
| 130 | } |
| 131 | }, |
Neil Fuller | a91d654 | 2018-12-11 20:11:22 +0000 | [diff] [blame] | 132 | prebuilts: art_runtime_time_zone_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 133 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 134 | key: "com.android.runtime.key", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 135 | } |
| 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. |
| 140 | apex { |
| 141 | name: "com.android.runtime.debug", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 142 | compile_multilib: "both", |
| 143 | manifest: "manifest.json", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 144 | native_shared_libs: art_runtime_base_native_shared_libs |
| 145 | + art_runtime_fake_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 146 | + art_runtime_debug_native_shared_libs |
| 147 | + bionic_native_shared_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 148 | 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 Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 152 | binaries: art_runtime_base_binaries_both |
| 153 | + bionic_binaries_both, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 154 | }, |
| 155 | prefer32: { |
| 156 | binaries: art_runtime_base_binaries_prefer32 |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 157 | + art_runtime_debug_binaries_prefer32, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 158 | }, |
| 159 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame^] | 160 | binaries: art_tools_device_binaries, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 161 | } |
| 162 | }, |
Neil Fuller | a91d654 | 2018-12-11 20:11:22 +0000 | [diff] [blame] | 163 | prebuilts: art_runtime_time_zone_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 164 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 165 | key: "com.android.runtime.key", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 166 | } |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 167 | |
| 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. |
| 173 | art_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 Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame^] | 190 | binaries: art_tools_host_binaries |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 191 | + art_runtime_base_binaries_prefer32 |
| 192 | + art_runtime_debug_binaries_prefer32, |
| 193 | } |
| 194 | }, |
| 195 | key: "com.android.runtime.key", |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 196 | target: { |
| 197 | darwin: { |
| 198 | enabled: false, |
| 199 | }, |
| 200 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 201 | } |