Elliott Hughes | 627d8d3 | 2019-09-30 16:46:18 -0700 | [diff] [blame] | 1 | // ART APEX module |
| 2 | // |
| 3 | // Contains both the Android Managed Runtime (ART) and the Android Core Library |
| 4 | // (Libcore). |
| 5 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 6 | // Modules listed in LOCAL_REQUIRED_MODULES for module art-runtime in art/Android.mk. |
| 7 | // - Base requirements (binaries for which both 32- and 64-bit versions are built, if relevant). |
| 8 | art_runtime_base_binaries_both = [ |
| 9 | "dalvikvm", |
| 10 | ] |
| 11 | // - Base requirements (binaries for which a 32-bit version is preferred). |
| 12 | art_runtime_base_binaries_prefer32 = [ |
| 13 | "dex2oat", |
| 14 | "dexoptanalyzer", |
| 15 | "profman", |
| 16 | ] |
| 17 | // - Base requirements (libraries). |
Roland Levillain | 1617f8c | 2019-03-26 17:52:30 +0000 | [diff] [blame] | 18 | // |
| 19 | // Note: ART on-device chroot-based testing and benchmarking is not yet using |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 20 | // the ART APEX, meaning that copies of some of these libraries have to be |
Roland Levillain | 1617f8c | 2019-03-26 17:52:30 +0000 | [diff] [blame] | 21 | // installed in `/system` for the ART Buildbot set-up to work properly. This is |
| 22 | // done by the `standalone-apex-files` Make phony target, used by the ART |
| 23 | // Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list, |
Martin Stjernholm | 84e5bb9 | 2019-09-05 19:56:46 +0100 | [diff] [blame] | 24 | // you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in |
Roland Levillain | 1617f8c | 2019-03-26 17:52:30 +0000 | [diff] [blame] | 25 | // `art/Android.mk`. |
| 26 | // TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 27 | // the ART APEX. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 28 | art_runtime_base_native_shared_libs = [ |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 29 | // External API (having APEX stubs). |
Martin Stjernholm | 84bf698 | 2019-02-05 15:07:57 +0000 | [diff] [blame] | 30 | "libdexfile_external", |
Martin Stjernholm | c2f8b50 | 2019-01-17 14:51:35 +0000 | [diff] [blame] | 31 | "libnativebridge", |
| 32 | "libnativehelper", |
| 33 | "libnativeloader", |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 34 | // libadbconnection is internal and loaded with dlopen(), but it cannot use |
| 35 | // "required" because of cyclic dependency (b/124505714). |
| 36 | "libadbconnection", |
| 37 | // TODO(b/124476339): Clean up the following libraries once "required" |
Martin Stjernholm | 0c15b82 | 2019-02-14 17:24:19 +0000 | [diff] [blame] | 38 | // dependencies work with APEX libraries. |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 39 | "libart", |
| 40 | "libart-compiler", |
Martin Stjernholm | 0c15b82 | 2019-02-14 17:24:19 +0000 | [diff] [blame] | 41 | "libdt_fd_forward", |
| 42 | "libdt_socket", |
| 43 | "libjdwp", |
| 44 | "libnpt", |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 45 | "libopenjdkjvm", |
| 46 | "libopenjdkjvmti", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 47 | ] |
Florian Mayer | 07710c5 | 2019-09-16 15:53:38 +0000 | [diff] [blame] | 48 | |
| 49 | art_runtime_base_native_device_only_shared_libs = [ |
| 50 | "libperfetto_hprof", |
| 51 | ] |
| 52 | |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 53 | bionic_native_shared_libs = [ |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 54 | // External API (having APEX stubs). |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 55 | "libc", |
| 56 | "libm", |
| 57 | "libdl", |
| 58 | ] |
Jiyong Park | 408f7d0 | 2019-04-02 23:04:42 +0900 | [diff] [blame] | 59 | |
Jiyong Park | e2bc9fe | 2018-12-26 11:36:39 +0900 | [diff] [blame] | 60 | bionic_binaries_both = [ |
| 61 | "linker", |
| 62 | ] |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 63 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 64 | // - Debug variants (binaries for which a 32-bit version is preferred). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 65 | art_runtime_debug_binaries_prefer32 = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 66 | "dexoptanalyzerd", |
| 67 | "profmand", |
| 68 | ] |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 69 | art_runtime_debug_binaries_prefer32_device = [ |
| 70 | "dex2oatd", |
| 71 | ] |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 72 | |
Alex Light | 572a096 | 2019-01-18 14:48:37 -0800 | [diff] [blame] | 73 | art_runtime_debug_binaries_both_host = [ |
| 74 | "dex2oatd", |
| 75 | ] |
| 76 | |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 77 | // - Debug variants (libraries). |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 78 | art_runtime_debug_native_shared_libs = [ |
Martin Stjernholm | c2f8b50 | 2019-01-17 14:51:35 +0000 | [diff] [blame] | 79 | "libadbconnectiond", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 80 | "libartd", |
| 81 | "libartd-compiler", |
Martin Stjernholm | 356864a | 2019-04-30 16:22:17 +0100 | [diff] [blame] | 82 | "libdexfiled_external", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 83 | "libopenjdkjvmd", |
| 84 | "libopenjdkjvmtid", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 85 | ] |
| 86 | |
Florian Mayer | 07710c5 | 2019-09-16 15:53:38 +0000 | [diff] [blame] | 87 | art_runtime_base_native_device_only_debug_shared_libs = [ |
Elliott Hughes | 627d8d3 | 2019-09-30 16:46:18 -0700 | [diff] [blame] | 88 | "libperfetto_hprofd", |
Florian Mayer | 07710c5 | 2019-09-16 15:53:38 +0000 | [diff] [blame] | 89 | ] |
| 90 | |
Roland Levillain | 4d6f24d | 2019-10-02 16:47:36 +0100 | [diff] [blame] | 91 | // Libraries needed to execute ART run-tests. |
| 92 | // TODO(b/124476339): When bug 124476339 is fixed, add these libraries as `runtime_libs` |
| 93 | // dependencies of `libartd-compiler`, and remove `art_runtime_run_test_libs`. |
| 94 | art_runtime_run_test_libs = [ |
| 95 | "libart-disassembler", |
| 96 | "libartd-disassembler", |
| 97 | ] |
| 98 | |
Orion Hodson | 5cb98a9 | 2019-03-25 15:07:16 +0000 | [diff] [blame] | 99 | // Tools common to both device APEX and host APEX. Derived from art-tools in art/Android.mk. |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 100 | art_tools_common_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 101 | "dexdump", |
| 102 | "dexlist", |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 103 | ] |
| 104 | |
Martin Stjernholm | 77f1766 | 2019-04-03 17:08:21 +0100 | [diff] [blame] | 105 | // Tools common to both device and host debug APEXes. |
| 106 | art_tools_debug_binaries = [ |
Roland Levillain | 6dd6212 | 2019-06-18 19:10:21 +0100 | [diff] [blame] | 107 | "dexanalyze", |
Martin Stjernholm | 77f1766 | 2019-04-03 17:08:21 +0100 | [diff] [blame] | 108 | "dexdiag", |
Roland Levillain | 6dd6212 | 2019-06-18 19:10:21 +0100 | [diff] [blame] | 109 | "dexlayout", |
| 110 | "dexlayoutd", |
| 111 | ] |
| 112 | |
| 113 | art_tools_debug_binaries_both = [ |
| 114 | "imgdiag", |
| 115 | "imgdiagd", |
Martin Stjernholm | 77f1766 | 2019-04-03 17:08:21 +0100 | [diff] [blame] | 116 | ] |
| 117 | |
Orion Hodson | 5cb98a9 | 2019-03-25 15:07:16 +0000 | [diff] [blame] | 118 | // Tools exclusively for the device APEX derived from art-tools in art/Android.mk. |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 119 | art_tools_device_only_binaries = [ |
| 120 | // oatdump cannot link with host linux_bionic due to not using clang lld; |
| 121 | // TODO: Make it work with clang lld. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 122 | "oatdump", |
| 123 | ] |
Roland Levillain | 02998cf | 2019-03-21 14:27:02 +0000 | [diff] [blame] | 124 | // Same, but for only for debug packages. |
| 125 | art_tools_debug_device_only_binaries = [ |
| 126 | // oatdumpd cannot link with host linux_bionic due to not using clang lld; |
| 127 | // TODO: Make it work with clang lld. |
| 128 | "oatdumpd", |
| 129 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 130 | |
Orion Hodson | 5cb98a9 | 2019-03-25 15:07:16 +0000 | [diff] [blame] | 131 | // Tools exclusively for the host APEX derived from art-tools in art/Android.mk. |
Roland Levillain | e9f0ccc | 2019-01-07 16:45:58 +0000 | [diff] [blame] | 132 | art_tools_host_only_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 133 | // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk |
| 134 | // (same issue as for `libart_fake` above). |
| 135 | //"ahat", |
| 136 | "hprof-conv", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 137 | ] |
| 138 | |
Roland Levillain | a0b1903 | 2019-02-08 15:59:56 +0000 | [diff] [blame] | 139 | // Core Java libraries. |
| 140 | libcore_java_libs = [ |
| 141 | "core-oj", |
| 142 | "core-libart", |
Victor Chang | 759845f | 2019-08-06 16:04:36 +0100 | [diff] [blame] | 143 | "core-icu4j", |
Roland Levillain | a0b1903 | 2019-02-08 15:59:56 +0000 | [diff] [blame] | 144 | "okhttp", |
| 145 | "bouncycastle", |
| 146 | "apache-xml", |
| 147 | ] |
| 148 | |
| 149 | // Native libraries that support the core Java libraries. |
Roland Levillain | 1617f8c | 2019-03-26 17:52:30 +0000 | [diff] [blame] | 150 | // |
| 151 | // Note: ART on-device chroot-based testing and benchmarking is not yet using |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 152 | // the ART APEX, meaning that copies of some of these libraries have to be |
Roland Levillain | 1617f8c | 2019-03-26 17:52:30 +0000 | [diff] [blame] | 153 | // installed in `/system` for the ART Buildbot set-up to work properly. This is |
| 154 | // done by the `standalone-apex-files` Make phony target, used by the ART |
| 155 | // Buildbot and Golem (see `art/Android.mk`). If you add libraries to this list, |
Martin Stjernholm | 84e5bb9 | 2019-09-05 19:56:46 +0100 | [diff] [blame] | 156 | // you may have to also add them to `PRIVATE_ART_APEX_DEPENDENCY_LIBS` in |
Roland Levillain | 1617f8c | 2019-03-26 17:52:30 +0000 | [diff] [blame] | 157 | // `art/Android.mk`. |
| 158 | // TODO(b/121117762): Remove this note when both the ART Buildbot and Golem use |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 159 | // the ART APEX. |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 160 | libcore_native_shared_libs = [ |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 161 | // External API (having APEX stubs). |
Victor Chang | 2f0008a | 2019-01-15 14:10:34 +0000 | [diff] [blame] | 162 | "libandroidicu", |
Pete Bentley | 79f5662 | 2019-03-21 17:09:56 +0000 | [diff] [blame] | 163 | "libandroidio", |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 164 | // TODO(b/124476339): Clean up the following libraries once "required" |
| 165 | // dependencies work with APEX libraries. |
Victor Chang | 2f0008a | 2019-01-15 14:10:34 +0000 | [diff] [blame] | 166 | "libexpat", |
| 167 | "libicui18n", |
| 168 | "libicuuc", |
Victor Chang | 65ae669 | 2019-10-11 14:17:21 +0100 | [diff] [blame] | 169 | "libicu_jni", |
Pete Bentley | 51ffdbe | 2019-01-11 15:25:40 +0000 | [diff] [blame] | 170 | "libjavacore", |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 171 | "libopenjdk", |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 172 | ] |
| 173 | libcore_debug_native_shared_libs = [ |
| 174 | "libopenjdkd", |
Victor Chang | 2f0008a | 2019-01-15 14:10:34 +0000 | [diff] [blame] | 175 | ] |
| 176 | |
Martin Stjernholm | 023c218 | 2019-03-28 15:52:32 +0000 | [diff] [blame] | 177 | libcore_native_device_only_shared_libs = [ |
Victor Chang | 2f0008a | 2019-01-15 14:10:34 +0000 | [diff] [blame] | 178 | // TODO(b/122876336): Remove libpac.so once it's migrated to Webview. |
| 179 | // libpac is used by frameworks, not by ART host. |
| 180 | "libpac", |
Roland Levillain | cb82d09 | 2018-11-02 18:50:15 +0000 | [diff] [blame] | 181 | ] |
| 182 | |
Alex Light | f7f3152 | 2019-02-01 11:14:41 -0800 | [diff] [blame] | 183 | // Temporary library includes for b/123591866 as all libraries are moved into the main art-apex. |
| 184 | art_runtime_libraries_zipapex = [ |
| 185 | "libnativebridge", |
| 186 | "libnativeloader", |
| 187 | "libnativehelper", |
| 188 | "libcutils", |
| 189 | ] |
| 190 | |
Jiyong Park | e961855 | 2019-02-11 10:54:36 +0900 | [diff] [blame] | 191 | android_app_certificate { |
Martin Stjernholm | 6da4569 | 2019-08-15 15:18:53 +0100 | [diff] [blame] | 192 | name: "com.android.art.certificate", |
| 193 | certificate: "com.android.art", |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | apex_key { |
| 197 | name: "com.android.art.key", |
| 198 | public_key: "com.android.art.avbpubkey", |
| 199 | private_key: "com.android.art.pem", |
Jiyong Park | e961855 | 2019-02-11 10:54:36 +0900 | [diff] [blame] | 200 | } |
| 201 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 202 | prebuilt_etc { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 203 | name: "com.android.art.ld.config.txt", |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 204 | src: "ld.config.txt", |
| 205 | filename: "ld.config.txt", |
| 206 | installable: false, |
| 207 | } |
| 208 | |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 209 | // Default values shared by device ART APEXes. |
Andreas Gampe | e55ea98 | 2019-02-26 09:11:20 -0800 | [diff] [blame] | 210 | apex_defaults { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 211 | name: "com.android.art-defaults", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 212 | compile_multilib: "both", |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 213 | manifest: "manifest-art.json", |
Roland Levillain | a0b1903 | 2019-02-08 15:59:56 +0000 | [diff] [blame] | 214 | java_libs: libcore_java_libs, |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 215 | native_shared_libs: art_runtime_base_native_shared_libs + |
Florian Mayer | 07710c5 | 2019-09-16 15:53:38 +0000 | [diff] [blame] | 216 | art_runtime_base_native_device_only_shared_libs + |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 217 | libcore_native_device_only_shared_libs + |
| 218 | libcore_native_shared_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 219 | multilib: { |
| 220 | both: { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 221 | binaries: art_runtime_base_binaries_both, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 222 | }, |
| 223 | prefer32: { |
| 224 | binaries: art_runtime_base_binaries_prefer32, |
| 225 | }, |
| 226 | first: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 227 | binaries: art_tools_common_binaries + |
| 228 | art_tools_device_only_binaries, |
| 229 | }, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 230 | }, |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 231 | binaries: [ |
Andreas Gampe | 5bb525a | 2019-02-19 12:26:35 -0800 | [diff] [blame] | 232 | "art_postinstall_hook", |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 233 | "art_preinstall_hook", |
Nicolas Geoffray | 0c63f76 | 2019-10-30 11:26:31 +0000 | [diff] [blame] | 234 | "art_preinstall_hook_boot", |
Andreas Gampe | 29c111e | 2019-02-28 13:58:07 -0800 | [diff] [blame] | 235 | "art_preinstall_hook_system_server", |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 236 | "art_prepostinstall_utils", |
| 237 | ], |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 238 | prebuilts: ["com.android.art.ld.config.txt"], |
| 239 | key: "com.android.art.key", |
Victor Chang | 6461124 | 2019-07-05 16:32:41 +0100 | [diff] [blame] | 240 | required: [ |
| 241 | "art_apex_boot_integrity", |
| 242 | "com.android.i18n", |
| 243 | ], |
Andreas Gampe | e55ea98 | 2019-02-26 09:11:20 -0800 | [diff] [blame] | 244 | } |
| 245 | |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 246 | // Default values shared by (device) Debug and Testing ART APEXes. |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 247 | apex_defaults { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 248 | name: "com.android.art-dev-defaults", |
| 249 | defaults: ["com.android.art-defaults"], |
Florian Mayer | 07710c5 | 2019-09-16 15:53:38 +0000 | [diff] [blame] | 250 | native_shared_libs: art_runtime_base_native_device_only_debug_shared_libs + |
Roland Levillain | 4d6f24d | 2019-10-02 16:47:36 +0100 | [diff] [blame] | 251 | art_runtime_run_test_libs + |
Florian Mayer | 07710c5 | 2019-09-16 15:53:38 +0000 | [diff] [blame] | 252 | art_runtime_debug_native_shared_libs + |
Roland Levillain | 89867bf | 2019-06-24 15:09:01 +0100 | [diff] [blame] | 253 | libcore_debug_native_shared_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 254 | multilib: { |
Roland Levillain | 6dd6212 | 2019-06-18 19:10:21 +0100 | [diff] [blame] | 255 | both: { |
| 256 | binaries: art_tools_debug_binaries_both, |
| 257 | }, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 258 | prefer32: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 259 | binaries: art_runtime_debug_binaries_prefer32 + |
| 260 | art_runtime_debug_binaries_prefer32_device, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 261 | }, |
| 262 | first: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 263 | binaries: art_tools_debug_binaries + |
| 264 | art_tools_debug_device_only_binaries, |
| 265 | }, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 266 | }, |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 267 | } |
| 268 | |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 269 | // Release version of the ART APEX module (not containing debug |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 270 | // variants nor tools), included in user builds. Also used for |
| 271 | // storage-constrained devices in userdebug and eng builds. |
Nicolas Geoffray | 0c63f76 | 2019-10-30 11:26:31 +0000 | [diff] [blame] | 272 | apex { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 273 | name: "com.android.art.release", |
| 274 | defaults: ["com.android.art-defaults"], |
Martin Stjernholm | 6da4569 | 2019-08-15 15:18:53 +0100 | [diff] [blame] | 275 | certificate: ":com.android.art.certificate", |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 276 | } |
| 277 | |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 278 | // "Debug" version of the ART APEX module (containing both release and |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 279 | // debug variants, as well as additional tools), included in userdebug and |
| 280 | // eng build. |
Nicolas Geoffray | 0c63f76 | 2019-10-30 11:26:31 +0000 | [diff] [blame] | 281 | apex { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 282 | name: "com.android.art.debug", |
| 283 | defaults: ["com.android.art-dev-defaults"], |
Martin Stjernholm | 6da4569 | 2019-08-15 15:18:53 +0100 | [diff] [blame] | 284 | certificate: ":com.android.art.certificate", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 285 | } |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 286 | |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 287 | // ART gtests with dependencies on internal ART APEX libraries. |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 288 | art_gtests = [ |
| 289 | "art_cmdline_tests", |
| 290 | "art_compiler_tests", |
| 291 | "art_dex2oat_tests", |
| 292 | "art_dexanalyze_tests", |
| 293 | "art_dexdiag_tests", |
| 294 | "art_dexdump_tests", |
| 295 | "art_dexlayout_tests", |
| 296 | "art_dexlist_tests", |
| 297 | "art_dexoptanalyzer_tests", |
| 298 | "art_imgdiag_tests", |
| 299 | "art_libartbase_tests", |
| 300 | "art_libartpalette_tests", |
| 301 | "art_libdexfile_tests", |
| 302 | "art_libdexfile_support_tests", |
| 303 | "art_libprofile_tests", |
| 304 | "art_oatdump_tests", |
| 305 | "art_profman_tests", |
| 306 | "art_runtime_compiler_tests", |
| 307 | "art_runtime_tests", |
| 308 | "art_sigchain_tests", |
| 309 | ] |
| 310 | |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 311 | // "Testing" version of the ART APEX module (containing both release |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 312 | // and debug variants, additional tools, and ART gtests), for testing |
| 313 | // purposes only. |
Nicolas Geoffray | 0c63f76 | 2019-10-30 11:26:31 +0000 | [diff] [blame] | 314 | apex_test { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 315 | name: "com.android.art.testing", |
| 316 | defaults: ["com.android.art-dev-defaults"], |
| 317 | file_contexts: "com.android.art.debug", |
Martin Stjernholm | 6da4569 | 2019-08-15 15:18:53 +0100 | [diff] [blame] | 318 | certificate: ":com.android.art.certificate", |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 319 | tests: art_gtests, |
Andreas Gampe | 816a552 | 2019-09-11 11:29:49 -0700 | [diff] [blame] | 320 | binaries: ["signal_dumper"], // Need signal_dumper for run-tests. |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | // TODO: Do this better. art_apex_test_host will disable host builds when |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 324 | // HOST_PREFER_32_BIT is set. We cannot simply use com.android.art.debug |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 325 | // because binaries have different multilib classes and 'multilib: {}' isn't |
| 326 | // supported by target: { ... }. |
| 327 | // See b/120617876 for more information. |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 328 | art_apex_test_host { |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 329 | name: "com.android.art.host", |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 330 | compile_multilib: "both", |
| 331 | payload_type: "zip", |
| 332 | host_supported: true, |
| 333 | device_supported: false, |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 334 | manifest: "manifest-art.json", |
Roland Levillain | a0b1903 | 2019-02-08 15:59:56 +0000 | [diff] [blame] | 335 | java_libs: libcore_java_libs, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 336 | ignore_system_library_special_case: true, |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 337 | native_shared_libs: art_runtime_base_native_shared_libs + |
| 338 | art_runtime_debug_native_shared_libs + |
| 339 | libcore_native_shared_libs + |
| 340 | libcore_debug_native_shared_libs + |
| 341 | art_runtime_libraries_zipapex + |
Roland Levillain | 4d6f24d | 2019-10-02 16:47:36 +0100 | [diff] [blame] | 342 | art_runtime_run_test_libs, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 343 | multilib: { |
| 344 | both: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 345 | binaries: art_runtime_base_binaries_both + |
Roland Levillain | 6dd6212 | 2019-06-18 19:10:21 +0100 | [diff] [blame] | 346 | art_runtime_debug_binaries_both_host + |
| 347 | art_tools_debug_binaries_both, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 348 | }, |
| 349 | first: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 350 | binaries: art_tools_common_binaries + // Host APEX is always debug. |
| 351 | art_tools_debug_binaries + |
| 352 | art_tools_host_only_binaries + |
| 353 | art_runtime_base_binaries_prefer32 + |
| 354 | art_runtime_debug_binaries_prefer32, |
| 355 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 356 | }, |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 357 | key: "com.android.art.key", |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 358 | target: { |
| 359 | darwin: { |
| 360 | enabled: false, |
| 361 | }, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 362 | linux_bionic: { |
| 363 | enabled: true, |
| 364 | multilib: { |
| 365 | both: { |
| 366 | native_shared_libs: bionic_native_shared_libs, |
| 367 | binaries: bionic_binaries_both, |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 368 | }, |
| 369 | }, |
Alex Light | 55a9bad | 2019-01-29 18:34:09 -0800 | [diff] [blame] | 370 | }, |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 371 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 372 | } |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 373 | |
| 374 | python_binary_host { |
| 375 | name: "art-apex-tester", |
| 376 | srcs: ["art_apex_test.py"], |
| 377 | main: "art_apex_test.py", |
| 378 | version: { |
| 379 | py2: { |
Roland Levillain | 29e740f | 2019-08-20 15:31:37 +0100 | [diff] [blame] | 380 | enabled: true, |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 381 | }, |
| 382 | py3: { |
Roland Levillain | 29e740f | 2019-08-20 15:31:37 +0100 | [diff] [blame] | 383 | enabled: false, |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 384 | }, |
| 385 | }, |
| 386 | } |
| 387 | |
| 388 | // Genrules so we can run the checker, and empty Java library so that it gets executed. |
| 389 | |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 390 | art_check_apex_gen_stem = "$(location art-apex-tester)" + |
| 391 | " --debugfs $(location debugfs)" + |
| 392 | " --tmpdir $(genDir)" |
| 393 | |
| 394 | // The non-flattened APEXes are always checked, as they are always generated |
| 395 | // (even when APEX flattening is enabled). |
| 396 | genrule_defaults { |
| 397 | name: "art-check-apex-gen-defaults", |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 398 | tools: [ |
| 399 | "art-apex-tester", |
| 400 | "debugfs", |
| 401 | ], |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 402 | } |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 403 | |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 404 | cc_defaults { |
| 405 | name: "art-check-apex-gen-fakebin-defaults", |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 406 | host_supported: true, |
| 407 | device_supported: false, |
| 408 | target: { |
| 409 | darwin: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 410 | enabled: false, // No python3. |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 411 | }, |
| 412 | }, |
| 413 | } |
| 414 | |
| 415 | genrule { |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 416 | name: "art-check-release-apex-gen", |
| 417 | defaults: ["art-check-apex-gen-defaults"], |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 418 | srcs: [":com.android.art.release"], |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 419 | cmd: art_check_apex_gen_stem + |
Roland Levillain | d7ea043 | 2019-09-09 16:29:12 +0100 | [diff] [blame] | 420 | " --flavor release" + |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 421 | " $(in)" + |
| 422 | " && touch $(out)", |
| 423 | out: ["art-check-release-apex-gen.dummy"], |
| 424 | } |
| 425 | |
| 426 | cc_prebuilt_binary { |
| 427 | name: "art-check-release-apex-gen-fakebin", |
| 428 | defaults: ["art-check-apex-gen-fakebin-defaults"], |
| 429 | srcs: [":art-check-release-apex-gen"], |
| 430 | } |
| 431 | |
| 432 | genrule { |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 433 | name: "art-check-debug-apex-gen", |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 434 | defaults: ["art-check-apex-gen-defaults"], |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 435 | srcs: [":com.android.art.debug"], |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 436 | cmd: art_check_apex_gen_stem + |
Roland Levillain | d7ea043 | 2019-09-09 16:29:12 +0100 | [diff] [blame] | 437 | " --flavor debug" + |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 438 | " $(in)" + |
| 439 | " && touch $(out)", |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 440 | out: ["art-check-debug-apex-gen.dummy"], |
| 441 | } |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 442 | |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 443 | cc_prebuilt_binary { |
| 444 | name: "art-check-debug-apex-gen-fakebin", |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 445 | defaults: ["art-check-apex-gen-fakebin-defaults"], |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 446 | srcs: [":art-check-debug-apex-gen"], |
Jiyong Park | 1410e9f | 2019-02-02 04:18:23 +0000 | [diff] [blame] | 447 | } |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 448 | |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 449 | genrule { |
| 450 | name: "art-check-testing-apex-gen", |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 451 | defaults: ["art-check-apex-gen-defaults"], |
Martin Stjernholm | fb3a94b | 2019-07-05 22:27:36 +0100 | [diff] [blame] | 452 | srcs: [":com.android.art.testing"], |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 453 | cmd: art_check_apex_gen_stem + |
Roland Levillain | d7ea043 | 2019-09-09 16:29:12 +0100 | [diff] [blame] | 454 | " --flavor testing" + |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 455 | " $(in)" + |
| 456 | " && touch $(out)", |
| 457 | out: ["art-check-testing-apex-gen.dummy"], |
| 458 | } |
| 459 | |
| 460 | cc_prebuilt_binary { |
| 461 | name: "art-check-testing-apex-gen-fakebin", |
Roland Levillain | d4fc62c | 2019-08-12 19:47:51 +0100 | [diff] [blame] | 462 | defaults: ["art-check-apex-gen-fakebin-defaults"], |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 463 | srcs: [":art-check-testing-apex-gen"], |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 464 | } |
| 465 | |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 466 | // Pre-install scripts. |
| 467 | |
| 468 | sh_binary { |
| 469 | name: "art_preinstall_hook", |
| 470 | src: "art_preinstall_hook.sh", |
| 471 | } |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 472 | |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 473 | sh_binary { |
Nicolas Geoffray | 0c63f76 | 2019-10-30 11:26:31 +0000 | [diff] [blame] | 474 | name: "art_preinstall_hook_boot", |
| 475 | src: "art_preinstall_hook_boot.sh", |
| 476 | } |
| 477 | |
| 478 | sh_binary { |
Andreas Gampe | 29c111e | 2019-02-28 13:58:07 -0800 | [diff] [blame] | 479 | name: "art_preinstall_hook_system_server", |
| 480 | src: "art_preinstall_hook_system_server.sh", |
| 481 | } |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 482 | |
Andreas Gampe | 29c111e | 2019-02-28 13:58:07 -0800 | [diff] [blame] | 483 | sh_binary { |
Andreas Gampe | 31782c1 | 2019-02-06 09:47:25 -0800 | [diff] [blame] | 484 | name: "art_prepostinstall_utils", |
| 485 | src: "art_prepostinstall_utils.sh", |
| 486 | } |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 487 | |
Andreas Gampe | 5bb525a | 2019-02-19 12:26:35 -0800 | [diff] [blame] | 488 | sh_binary { |
| 489 | name: "art_postinstall_hook", |
| 490 | src: "art_postinstall_hook.sh", |
| 491 | } |
Andreas Gampe | 5797568 | 2019-03-04 09:27:11 -0800 | [diff] [blame] | 492 | |
| 493 | sh_binary { |
| 494 | name: "art_apex_boot_integrity", |
| 495 | src: "art_apex_boot_integrity.sh", |
| 496 | init_rc: ["art_apex_boot_integrity.rc"], |
| 497 | } |