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", |
| 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 | ] |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 27 | // - Fake library that avoids namespace issues and gives some warnings for nosy apps. |
| 28 | art_runtime_fake_native_shared_libs = [ |
| 29 | // FIXME: Does not work as-is, because `libart_fake` is defined in libart_fake/Android.mk, |
| 30 | // and because a module defined in a Blueprint file cannot depend on a module defined in a |
| 31 | // Makefile. To support `libart_fake` as a dependency of this APEX module, we can either |
| 32 | // (probably in that order of preference): |
| 33 | // a. translate that logic into Blueprint; or |
| 34 | // b. write the whole Android Runtime APEX generation logic in Android.mk; or |
| 35 | // c. introduce an `art_apex` module type extending the `apex` module type and write the |
| 36 | // corresponding Go logic to handle this extra dependency. |
| 37 | //"libart_fake", |
| 38 | ] |
| 39 | // - Debug variants (binaries for which a 32-bit version is preferred). |
| 40 | // FIXME: These modules are optional (the built product can decide to include them or not). |
| 41 | // Should they be moved to another APEX file? |
| 42 | art_runtime_debug_binaries_prefer32 = [ |
| 43 | "dex2oatd", |
| 44 | "dexoptanalyzerd", |
| 45 | "profmand", |
| 46 | ] |
| 47 | art_runtime_debug_native_shared_libs = [ |
| 48 | "libartd", |
| 49 | "libartd-compiler", |
| 50 | "libopenjdkd", |
| 51 | "libopenjdkjvmd", |
| 52 | "libopenjdkjvmtid", |
| 53 | "libadbconnectiond", |
| 54 | ] |
| 55 | |
Neil Fuller | a91d654 | 2018-12-11 20:11:22 +0000 | [diff] [blame] | 56 | // Files associated with bionic / managed core library time zone APIs. |
| 57 | art_runtime_time_zone_prebuilts = [ |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 58 | "apex_tz_version", |
| 59 | "apex_tzdata", |
| 60 | "apex_tzlookup.xml", |
| 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 | |
| 70 | art_tools_device_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 71 | "oatdump", |
| 72 | ] |
| 73 | |
| 74 | // Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
| 75 | // TODO: Include these modules in the future "host APEX". |
| 76 | art_tools_host_binaries = [ |
| 77 | // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk |
| 78 | // (same issue as for `libart_fake` above). |
| 79 | //"ahat", |
| 80 | "hprof-conv", |
| 81 | // ... |
| 82 | ] |
| 83 | |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 84 | art_tools_binaries = art_tools_common_binaries + art_tools_device_binaries |
| 85 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 86 | apex_key { |
| 87 | name: "com.android.runtime.key", |
Jiyong Park | 11a2df3 | 2018-11-22 16:25:08 +0900 | [diff] [blame] | 88 | public_key: "com.android.runtime.avbpubkey", |
| 89 | private_key: "com.android.runtime.pem", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 90 | } |
| 91 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 92 | prebuilt_etc { |
| 93 | name: "com.android.runtime.ld.config.txt", |
| 94 | src: "ld.config.txt", |
| 95 | filename: "ld.config.txt", |
| 96 | installable: false, |
| 97 | } |
| 98 | |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 99 | // TODO: Introduce `apex_defaults` to factor common parts of `apex` |
| 100 | // module definitions below? |
| 101 | |
| 102 | // Release version of the Runtime APEX module (not containing debug |
| 103 | // variants nor tools), included in user builds. Also used for |
| 104 | // storage-constrained devices in userdebug and eng builds. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 105 | apex { |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 106 | name: "com.android.runtime.release", |
| 107 | compile_multilib: "both", |
| 108 | manifest: "manifest.json", |
| 109 | native_shared_libs: art_runtime_base_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 110 | + art_runtime_fake_native_shared_libs |
| 111 | + bionic_native_shared_libs, |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 112 | multilib: { |
| 113 | both: { |
| 114 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 115 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
| 116 | binaries: art_runtime_base_binaries_both, |
| 117 | }, |
| 118 | prefer32: { |
| 119 | binaries: art_runtime_base_binaries_prefer32, |
| 120 | }, |
| 121 | first: { |
| 122 | binaries: [], |
| 123 | } |
| 124 | }, |
Neil Fuller | a91d654 | 2018-12-11 20:11:22 +0000 | [diff] [blame] | 125 | prebuilts: art_runtime_time_zone_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 126 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 127 | key: "com.android.runtime.key", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | // "Debug" version of the Runtime APEX module (containing both release and |
| 131 | // debug variants, as well as additional tools), included in userdebug and |
| 132 | // eng build. |
| 133 | apex { |
| 134 | name: "com.android.runtime.debug", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 135 | compile_multilib: "both", |
| 136 | manifest: "manifest.json", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 137 | native_shared_libs: art_runtime_base_native_shared_libs |
| 138 | + art_runtime_fake_native_shared_libs |
Jiyong Park | 3296fb1 | 2018-12-13 18:32:21 +0900 | [diff] [blame] | 139 | + art_runtime_debug_native_shared_libs |
| 140 | + bionic_native_shared_libs, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 141 | multilib: { |
| 142 | both: { |
| 143 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 144 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
| 145 | binaries: art_runtime_base_binaries_both, |
| 146 | }, |
| 147 | prefer32: { |
| 148 | binaries: art_runtime_base_binaries_prefer32 |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 149 | + art_runtime_debug_binaries_prefer32, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 150 | }, |
| 151 | first: { |
| 152 | binaries: art_tools_binaries, |
| 153 | } |
| 154 | }, |
Neil Fuller | a91d654 | 2018-12-11 20:11:22 +0000 | [diff] [blame] | 155 | prebuilts: art_runtime_time_zone_prebuilts |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame] | 156 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 157 | key: "com.android.runtime.key", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 158 | } |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 159 | |
| 160 | // TODO: Do this better. art_apex will disable host builds when |
| 161 | // HOST_PREFER_32_BIT is set. We cannot simply use com.android.runtime.debug |
| 162 | // because binaries have different multilib classes and 'multilib: {}' isn't |
| 163 | // supported by target: { ... }. |
| 164 | // See b/120617876 for more information. |
| 165 | art_apex { |
| 166 | name: "com.android.runtime.host", |
| 167 | compile_multilib: "both", |
| 168 | payload_type: "zip", |
| 169 | host_supported: true, |
| 170 | device_supported: false, |
| 171 | manifest: "manifest.json", |
| 172 | native_shared_libs: art_runtime_base_native_shared_libs |
| 173 | + art_runtime_fake_native_shared_libs |
| 174 | + art_runtime_debug_native_shared_libs, |
| 175 | multilib: { |
| 176 | both: { |
| 177 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 178 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
| 179 | binaries: art_runtime_base_binaries_both, |
| 180 | }, |
| 181 | first: { |
| 182 | // TODO: oatdump cannot link with host linux_bionic due to not using clang ld |
| 183 | binaries: art_tools_common_binaries |
| 184 | + art_runtime_base_binaries_prefer32 |
| 185 | + art_runtime_debug_binaries_prefer32, |
| 186 | } |
| 187 | }, |
| 188 | key: "com.android.runtime.key", |
Alex Light | e352152 | 2018-12-06 22:51:18 -0800 | [diff] [blame] | 189 | target: { |
| 190 | darwin: { |
| 191 | enabled: false, |
| 192 | }, |
| 193 | }, |
Alex Light | da948ce | 2018-12-06 17:05:41 +0000 | [diff] [blame] | 194 | } |