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 | // - 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 = [ |
| 33 | "dex2oatd", |
| 34 | "dexoptanalyzerd", |
| 35 | "profmand", |
| 36 | ] |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame^] | 37 | // - Debug variants (libraries). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 38 | art_runtime_debug_native_shared_libs = [ |
| 39 | "libartd", |
| 40 | "libartd-compiler", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 41 | "libopenjdkjvmd", |
| 42 | "libopenjdkjvmtid", |
| 43 | "libadbconnectiond", |
| 44 | ] |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame^] | 45 | libcore_debug_native_shared_libs = [ |
| 46 | "libopenjdkd", |
| 47 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 48 | |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 49 | // Data files associated with bionic / managed core library APIs. |
| 50 | art_runtime_data_file_prebuilts = [ |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 51 | "apex_tz_version", |
| 52 | "apex_tzdata", |
| 53 | "apex_tzlookup.xml", |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 54 | "apex_icu.dat", |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 55 | ] |
| 56 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 57 | // 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] | 58 | art_tools_common_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 59 | "dexdiag", |
| 60 | "dexdump", |
| 61 | "dexlist", |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 62 | ] |
| 63 | |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 64 | // Device-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
| 65 | art_tools_device_only_binaries = [ |
| 66 | // oatdump cannot link with host linux_bionic due to not using clang lld; |
| 67 | // TODO: Make it work with clang lld. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 68 | "oatdump", |
| 69 | ] |
| 70 | |
| 71 | // 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] | 72 | art_tools_host_only_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 73 | // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk |
| 74 | // (same issue as for `libart_fake` above). |
| 75 | //"ahat", |
| 76 | "hprof-conv", |
| 77 | // ... |
| 78 | ] |
| 79 | |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 80 | art_tools_device_binaries = art_tools_common_binaries + art_tools_device_only_binaries |
| 81 | 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] | 82 | |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame^] | 83 | // (Some) Libcore native libraries. |
| 84 | libcore_native_shared_libs = [ |
| 85 | "libopenjdk", |
| 86 | ] |
| 87 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 88 | apex_key { |
| 89 | name: "com.android.runtime.key", |
Jiyong Park | 11a2df3 | 2018-11-22 16:25:08 +0900 | [diff] [blame] | 90 | public_key: "com.android.runtime.avbpubkey", |
| 91 | private_key: "com.android.runtime.pem", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 92 | } |
| 93 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 94 | prebuilt_etc { |
| 95 | name: "com.android.runtime.ld.config.txt", |
| 96 | src: "ld.config.txt", |
| 97 | filename: "ld.config.txt", |
| 98 | installable: false, |
| 99 | } |
| 100 | |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 101 | // TODO: Introduce `apex_defaults` to factor common parts of `apex` |
| 102 | // module definitions below? |
| 103 | |
| 104 | // Release version of the Runtime APEX module (not containing debug |
| 105 | // variants nor tools), included in user builds. Also used for |
| 106 | // storage-constrained devices in userdebug and eng builds. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 107 | apex { |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 108 | name: "com.android.runtime.release", |
| 109 | compile_multilib: "both", |
| 110 | manifest: "manifest.json", |
| 111 | native_shared_libs: art_runtime_base_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame^] | 112 | + bionic_native_shared_libs |
| 113 | + libcore_native_shared_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 114 | multilib: { |
| 115 | both: { |
| 116 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 117 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 118 | binaries: art_runtime_base_binaries_both |
| 119 | + bionic_binaries_both, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 120 | }, |
| 121 | prefer32: { |
| 122 | binaries: art_runtime_base_binaries_prefer32, |
| 123 | }, |
| 124 | first: { |
| 125 | binaries: [], |
| 126 | } |
| 127 | }, |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 128 | prebuilts: art_runtime_data_file_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 129 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 130 | key: "com.android.runtime.key", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | // "Debug" version of the Runtime APEX module (containing both release and |
| 134 | // debug variants, as well as additional tools), included in userdebug and |
| 135 | // eng build. |
| 136 | apex { |
| 137 | name: "com.android.runtime.debug", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 138 | compile_multilib: "both", |
| 139 | manifest: "manifest.json", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 140 | native_shared_libs: art_runtime_base_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 141 | + art_runtime_debug_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame^] | 142 | + bionic_native_shared_libs |
| 143 | + libcore_native_shared_libs |
| 144 | + libcore_debug_native_shared_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 145 | multilib: { |
| 146 | both: { |
| 147 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 148 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 149 | binaries: art_runtime_base_binaries_both |
| 150 | + bionic_binaries_both, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 151 | }, |
| 152 | prefer32: { |
| 153 | binaries: art_runtime_base_binaries_prefer32 |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 154 | + art_runtime_debug_binaries_prefer32, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 155 | }, |
| 156 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 157 | binaries: art_tools_device_binaries, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 158 | } |
| 159 | }, |
Neil Fuller | 5ab4a56 | 2018-12-11 20:33:46 +0000 | [diff] [blame] | 160 | prebuilts: art_runtime_data_file_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 161 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 162 | key: "com.android.runtime.key", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 163 | } |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 164 | |
| 165 | // TODO: Do this better. art_apex will disable host builds when |
| 166 | // HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug |
| 167 | // because binaries have different multilib classes and 'multilib: {}' isn't |
| 168 | // supported by target: { ... }. |
| 169 | // See b/120617876 for more information. |
| 170 | art_apex { |
| 171 | name: "com.android.runtime.host", |
| 172 | compile_multilib: "both", |
| 173 | payload_type: "zip", |
| 174 | host_supported: true, |
| 175 | device_supported: false, |
| 176 | manifest: "manifest.json", |
| 177 | native_shared_libs: art_runtime_base_native_shared_libs |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame^] | 178 | + art_runtime_debug_native_shared_libs |
| 179 | + libcore_native_shared_libs |
| 180 | + libcore_debug_native_shared_libs, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 181 | multilib: { |
| 182 | both: { |
| 183 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 184 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
| 185 | binaries: art_runtime_base_binaries_both, |
| 186 | }, |
| 187 | first: { |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 188 | binaries: art_tools_host_binaries |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 189 | + art_runtime_base_binaries_prefer32 |
| 190 | + art_runtime_debug_binaries_prefer32, |
| 191 | } |
| 192 | }, |
| 193 | key: "com.android.runtime.key", |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 194 | target: { |
| 195 | darwin: { |
| 196 | enabled: false, |
| 197 | }, |
| 198 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 199 | } |