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 = [ |
Martin Stjernholm | 23b2704 | 2019-01-11 10:36:35 +0000 | [diff] [blame] | 16 | "libadbconnection", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 17 | "libart", |
| 18 | "libart-compiler", |
Martin Stjernholm | 23b2704 | 2019-01-11 10:36:35 +0000 | [diff] [blame] | 19 | "libdexfile_external", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 20 | "libopenjdkjvm", |
| 21 | "libopenjdkjvmti", |
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 | // - Debug variants (binaries for which a 32-bit version is preferred). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 32 | art_runtime_debug_binaries_prefer32 = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 33 | "dexoptanalyzerd", |
| 34 | "profmand", |
| 35 | ] |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 36 | art_runtime_debug_binaries_prefer32_device = [ |
| 37 | "dex2oatd", |
| 38 | ] |
| 39 | art_runtime_debug_binaries_both_host = [ |
| 40 | "dex2oatd", |
| 41 | ] |
| 42 | |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 43 | // - Debug variants (libraries). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 44 | art_runtime_debug_native_shared_libs = [ |
Martin Stjernholm | 23b2704 | 2019-01-11 10:36:35 +0000 | [diff] [blame] | 45 | "libadbconnectiond", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 46 | "libartd", |
| 47 | "libartd-compiler", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 48 | "libopenjdkjvmd", |
| 49 | "libopenjdkjvmtid", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 50 | ] |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 51 | libcore_debug_native_shared_libs = [ |
| 52 | "libopenjdkd", |
| 53 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 54 | |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 55 | // Data files associated with bionic / managed core library APIs. |
| 56 | art_runtime_data_file_prebuilts = [ |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 57 | "apex_tz_version", |
| 58 | "apex_tzdata", |
| 59 | "apex_tzlookup.xml", |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 60 | "apex_icu.dat", |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 61 | ] |
| 62 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 63 | // 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] | 64 | art_tools_common_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 65 | "dexdiag", |
| 66 | "dexdump", |
| 67 | "dexlist", |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 68 | ] |
| 69 | |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 70 | // Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
| 71 | art_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 Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 74 | "oatdump", |
| 75 | ] |
| 76 | |
| 77 | // 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] | 78 | art_tools_host_only_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 79 | // 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 Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 86 | art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries |
| 87 | 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] | 88 | |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 89 | // Libcore native libraries. |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 90 | libcore_native_shared_libs = [ |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 91 | "libjavacore", |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 92 | "libopenjdk", |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 93 | "libexpat", |
| 94 | "libz", |
| 95 | "libziparchive" |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 96 | ] |
| 97 | |
Nicolas Geoffray | cc64d08 | 2019-01-25 09:43:18 +0000 | [diff] [blame] | 98 | // Java libraries |
| 99 | libcore_target_java_libs = [ |
| 100 | "core-oj", |
| 101 | "core-libart", |
| 102 | "okhttp", |
| 103 | "bouncycastle", |
| 104 | "apache-xml", |
| 105 | ] |
| 106 | |
Alex Light | f7f3152 | 2019-02-01 11:14:41 -0800 | [diff] [blame^] | 107 | // Temporary library includes for b/123591866 as all libraries are moved into the main art-apex. |
| 108 | art_runtime_libraries_zipapex = [ |
| 109 | "libnativebridge", |
| 110 | "libnativeloader", |
| 111 | "libnativehelper", |
| 112 | "libcutils", |
| 113 | ] |
| 114 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 115 | apex_key { |
| 116 | name: "com.android.runtime.key", |
Jiyong Park | 11a2df3 | 2018-11-22 16:25:08 +0900 | [diff] [blame] | 117 | public_key: "com.android.runtime.avbpubkey", |
| 118 | private_key: "com.android.runtime.pem", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 119 | } |
| 120 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 121 | prebuilt_etc { |
| 122 | name: "com.android.runtime.ld.config.txt", |
| 123 | src: "ld.config.txt", |
| 124 | filename: "ld.config.txt", |
| 125 | installable: false, |
| 126 | } |
| 127 | |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 128 | // TODO: Introduce `apex_defaults` to factor common parts of `apex` |
| 129 | // module definitions below? |
| 130 | |
| 131 | // Release version of the Runtime APEX module (not containing debug |
| 132 | // variants nor tools), included in user builds. Also used for |
| 133 | // storage-constrained devices in userdebug and eng builds. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 134 | apex { |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 135 | name: "com.android.runtime.release", |
| 136 | compile_multilib: "both", |
| 137 | manifest: "manifest.json", |
Nicolas Geoffray | cc64d08 | 2019-01-25 09:43:18 +0000 | [diff] [blame] | 138 | java_libs: libcore_target_java_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 139 | native_shared_libs: art_runtime_base_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 140 | + bionic_native_shared_libs |
| 141 | + libcore_native_shared_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 142 | multilib: { |
| 143 | both: { |
| 144 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 145 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 146 | binaries: art_runtime_base_binaries_both |
| 147 | + bionic_binaries_both, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 148 | }, |
| 149 | prefer32: { |
| 150 | binaries: art_runtime_base_binaries_prefer32, |
| 151 | }, |
| 152 | first: { |
| 153 | binaries: [], |
| 154 | } |
| 155 | }, |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 156 | prebuilts: art_runtime_data_file_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 157 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 158 | key: "com.android.runtime.key", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | // "Debug" version of the Runtime APEX module (containing both release and |
| 162 | // debug variants, as well as additional tools), included in userdebug and |
| 163 | // eng build. |
| 164 | apex { |
| 165 | name: "com.android.runtime.debug", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 166 | compile_multilib: "both", |
| 167 | manifest: "manifest.json", |
Nicolas Geoffray | cc64d08 | 2019-01-25 09:43:18 +0000 | [diff] [blame] | 168 | java_libs: libcore_target_java_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 169 | native_shared_libs: art_runtime_base_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 170 | + art_runtime_debug_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 171 | + bionic_native_shared_libs |
| 172 | + libcore_native_shared_libs |
| 173 | + libcore_debug_native_shared_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 174 | multilib: { |
| 175 | both: { |
| 176 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 177 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 178 | binaries: art_runtime_base_binaries_both |
| 179 | + bionic_binaries_both, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 180 | }, |
| 181 | prefer32: { |
| 182 | binaries: art_runtime_base_binaries_prefer32 |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 183 | + art_runtime_debug_binaries_prefer32 |
| 184 | + art_runtime_debug_binaries_prefer32_device, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 185 | }, |
| 186 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 187 | binaries: art_tools_device_binaries, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 188 | } |
| 189 | }, |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 190 | prebuilts: art_runtime_data_file_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 191 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 192 | key: "com.android.runtime.key", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 193 | } |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 194 | |
| 195 | // TODO: Do this better. art_apex will disable host builds when |
| 196 | // HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug |
| 197 | // because binaries have different multilib classes and 'multilib: {}' isn't |
| 198 | // supported by target: { ... }. |
| 199 | // See b/120617876 for more information. |
| 200 | art_apex { |
| 201 | name: "com.android.runtime.host", |
| 202 | compile_multilib: "both", |
Alex Light | f7f3152 | 2019-02-01 11:14:41 -0800 | [diff] [blame^] | 203 | installable: false, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 204 | payload_type: "zip", |
| 205 | host_supported: true, |
| 206 | device_supported: false, |
| 207 | manifest: "manifest.json", |
Alex Light | a6ea602 | 2019-01-29 11:02:03 -0800 | [diff] [blame] | 208 | java_libs: libcore_target_java_libs, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 209 | ignore_system_library_special_case: true, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 210 | native_shared_libs: art_runtime_base_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 211 | + art_runtime_debug_native_shared_libs |
| 212 | + libcore_native_shared_libs |
Alex Light | f7f3152 | 2019-02-01 11:14:41 -0800 | [diff] [blame^] | 213 | + libcore_debug_native_shared_libs |
| 214 | + art_runtime_libraries_zipapex, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 215 | multilib: { |
| 216 | both: { |
| 217 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 218 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 219 | binaries: art_runtime_base_binaries_both |
| 220 | + art_runtime_debug_binaries_both_host, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 221 | }, |
| 222 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 223 | binaries: art_tools_host_binaries |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 224 | + art_runtime_base_binaries_prefer32 |
| 225 | + art_runtime_debug_binaries_prefer32, |
| 226 | } |
| 227 | }, |
| 228 | key: "com.android.runtime.key", |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 229 | target: { |
| 230 | darwin: { |
| 231 | enabled: false, |
| 232 | }, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 233 | linux_bionic: { |
| 234 | enabled: true, |
| 235 | multilib: { |
| 236 | both: { |
| 237 | native_shared_libs: bionic_native_shared_libs, |
| 238 | binaries: bionic_binaries_both, |
| 239 | } |
| 240 | } |
| 241 | }, |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 242 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 243 | } |