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", |
Martin Stjernholm | 7e7ab23 | 2019-02-01 12:58:08 +0000 | [diff] [blame^] | 20 | "libadbconnection", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 21 | ] |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 22 | bionic_native_shared_libs = [ |
| 23 | "libc", |
| 24 | "libm", |
| 25 | "libdl", |
| 26 | ] |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 27 | bionic_binaries_both = [ |
| 28 | "linker", |
| 29 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 30 | // - Debug variants (binaries for which a 32-bit version is preferred). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 31 | art_runtime_debug_binaries_prefer32 = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 32 | "dexoptanalyzerd", |
| 33 | "profmand", |
| 34 | ] |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 35 | art_runtime_debug_binaries_prefer32_device = [ |
| 36 | "dex2oatd", |
| 37 | ] |
| 38 | art_runtime_debug_binaries_both_host = [ |
| 39 | "dex2oatd", |
| 40 | ] |
| 41 | |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 42 | // - Debug variants (libraries). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 43 | art_runtime_debug_native_shared_libs = [ |
| 44 | "libartd", |
| 45 | "libartd-compiler", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 46 | "libopenjdkjvmd", |
| 47 | "libopenjdkjvmtid", |
Martin Stjernholm | 7e7ab23 | 2019-02-01 12:58:08 +0000 | [diff] [blame^] | 48 | "libadbconnectiond", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 49 | ] |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 50 | libcore_debug_native_shared_libs = [ |
| 51 | "libopenjdkd", |
| 52 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 53 | |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 54 | // Data files associated with bionic / managed core library APIs. |
| 55 | art_runtime_data_file_prebuilts = [ |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 56 | "apex_tz_version", |
| 57 | "apex_tzdata", |
| 58 | "apex_tzlookup.xml", |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 59 | "apex_icu.dat", |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 60 | ] |
| 61 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 62 | // 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] | 63 | art_tools_common_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 64 | "dexdiag", |
| 65 | "dexdump", |
| 66 | "dexlist", |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 67 | ] |
| 68 | |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 69 | // Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
| 70 | art_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 Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 73 | "oatdump", |
| 74 | ] |
| 75 | |
| 76 | // 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] | 77 | art_tools_host_only_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 78 | // 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 Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 85 | art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries |
| 86 | 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] | 87 | |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 88 | // Libcore native libraries. |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 89 | libcore_native_shared_libs = [ |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 90 | "libjavacore", |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 91 | "libopenjdk", |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 92 | "libexpat", |
| 93 | "libz", |
| 94 | "libziparchive" |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 95 | ] |
| 96 | |
Nicolas Geoffray | cc64d08 | 2019-01-25 09:43:18 +0000 | [diff] [blame] | 97 | // Java libraries |
| 98 | libcore_target_java_libs = [ |
| 99 | "core-oj", |
| 100 | "core-libart", |
| 101 | "okhttp", |
| 102 | "bouncycastle", |
| 103 | "apache-xml", |
| 104 | ] |
| 105 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 106 | apex_key { |
| 107 | name: "com.android.runtime.key", |
Jiyong Park | 11a2df3 | 2018-11-22 16:25:08 +0900 | [diff] [blame] | 108 | public_key: "com.android.runtime.avbpubkey", |
| 109 | private_key: "com.android.runtime.pem", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 110 | } |
| 111 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 112 | prebuilt_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 Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 119 | // 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 Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 125 | apex { |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 126 | name: "com.android.runtime.release", |
| 127 | compile_multilib: "both", |
| 128 | manifest: "manifest.json", |
Nicolas Geoffray | cc64d08 | 2019-01-25 09:43:18 +0000 | [diff] [blame] | 129 | java_libs: libcore_target_java_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 130 | native_shared_libs: art_runtime_base_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 131 | + bionic_native_shared_libs |
| 132 | + libcore_native_shared_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 133 | 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 Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 137 | binaries: art_runtime_base_binaries_both |
| 138 | + bionic_binaries_both, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 139 | }, |
| 140 | prefer32: { |
| 141 | binaries: art_runtime_base_binaries_prefer32, |
| 142 | }, |
| 143 | first: { |
| 144 | binaries: [], |
| 145 | } |
| 146 | }, |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 147 | prebuilts: art_runtime_data_file_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 148 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 149 | key: "com.android.runtime.key", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 150 | } |
| 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. |
| 155 | apex { |
| 156 | name: "com.android.runtime.debug", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 157 | compile_multilib: "both", |
| 158 | manifest: "manifest.json", |
Nicolas Geoffray | cc64d08 | 2019-01-25 09:43:18 +0000 | [diff] [blame] | 159 | java_libs: libcore_target_java_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 160 | native_shared_libs: art_runtime_base_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 161 | + art_runtime_debug_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 162 | + bionic_native_shared_libs |
| 163 | + libcore_native_shared_libs |
| 164 | + libcore_debug_native_shared_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 165 | 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 Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 169 | binaries: art_runtime_base_binaries_both |
| 170 | + bionic_binaries_both, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 171 | }, |
| 172 | prefer32: { |
| 173 | binaries: art_runtime_base_binaries_prefer32 |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 174 | + art_runtime_debug_binaries_prefer32 |
| 175 | + art_runtime_debug_binaries_prefer32_device, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 176 | }, |
| 177 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 178 | binaries: art_tools_device_binaries, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 179 | } |
| 180 | }, |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 181 | prebuilts: art_runtime_data_file_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 182 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 183 | key: "com.android.runtime.key", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 184 | } |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 185 | |
| 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. |
| 191 | art_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 Light | a6ea602 | 2019-01-29 11:02:03 -0800 | [diff] [blame] | 198 | java_libs: libcore_target_java_libs, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 199 | ignore_system_library_special_case: true, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 200 | native_shared_libs: art_runtime_base_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 201 | + art_runtime_debug_native_shared_libs |
| 202 | + libcore_native_shared_libs |
| 203 | + libcore_debug_native_shared_libs, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 204 | 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 Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 208 | binaries: art_runtime_base_binaries_both |
| 209 | + art_runtime_debug_binaries_both_host, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 210 | }, |
| 211 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 212 | binaries: art_tools_host_binaries |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 213 | + art_runtime_base_binaries_prefer32 |
| 214 | + art_runtime_debug_binaries_prefer32, |
| 215 | } |
| 216 | }, |
| 217 | key: "com.android.runtime.key", |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 218 | target: { |
| 219 | darwin: { |
| 220 | enabled: false, |
| 221 | }, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 222 | 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 Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 231 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 232 | } |