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 | ] |
| 22 | // - Fake library that avoids namespace issues and gives some warnings for nosy apps. |
| 23 | art_runtime_fake_native_shared_libs = [ |
| 24 | // FIXME: Does not work as-is, because `libart_fake` is defined in libart_fake/Android.mk, |
| 25 | // and because a module defined in a Blueprint file cannot depend on a module defined in a |
| 26 | // Makefile. To support `libart_fake` as a dependency of this APEX module, we can either |
| 27 | // (probably in that order of preference): |
| 28 | // a. translate that logic into Blueprint; or |
| 29 | // b. write the whole Android Runtime APEX generation logic in Android.mk; or |
| 30 | // c. introduce an `art_apex` module type extending the `apex` module type and write the |
| 31 | // corresponding Go logic to handle this extra dependency. |
| 32 | //"libart_fake", |
| 33 | ] |
| 34 | // - Debug variants (binaries for which a 32-bit version is preferred). |
| 35 | // FIXME: These modules are optional (the built product can decide to include them or not). |
| 36 | // Should they be moved to another APEX file? |
| 37 | art_runtime_debug_binaries_prefer32 = [ |
| 38 | "dex2oatd", |
| 39 | "dexoptanalyzerd", |
| 40 | "profmand", |
| 41 | ] |
| 42 | art_runtime_debug_native_shared_libs = [ |
| 43 | "libartd", |
| 44 | "libartd-compiler", |
| 45 | "libopenjdkd", |
| 46 | "libopenjdkjvmd", |
| 47 | "libopenjdkjvmtid", |
| 48 | "libadbconnectiond", |
| 49 | ] |
| 50 | |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame^] | 51 | // Files associated with bionic / managed core library time zone APIs. |
| 52 | art_runtime_time_zone_prebuilts = [ |
| 53 | "apex_tz_version", |
| 54 | "apex_tzdata", |
| 55 | "apex_tzlookup.xml", |
| 56 | ] |
| 57 | |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 58 | // Modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
Nicolas Geoffray | 1047f1a | 2018-12-06 09:05:53 +0000 | [diff] [blame] | 59 | art_tools_binaries = [ |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 60 | "dexdiag", |
| 61 | "dexdump", |
| 62 | "dexlist", |
| 63 | "oatdump", |
| 64 | ] |
| 65 | |
| 66 | // Host-only modules listed in LOCAL_REQUIRED_MODULES for module art-tools in art/Android.mk. |
| 67 | // TODO: Include these modules in the future "host APEX". |
| 68 | art_tools_host_binaries = [ |
| 69 | // FIXME: Does not work as-is, because `ahat` is defined in tools/ahat/Android.mk |
| 70 | // (same issue as for `libart_fake` above). |
| 71 | //"ahat", |
| 72 | "hprof-conv", |
| 73 | // ... |
| 74 | ] |
| 75 | |
| 76 | apex_key { |
| 77 | name: "com.android.runtime.key", |
Jiyong Park | 11a2df3 | 2018-11-22 16:25:08 +0900 | [diff] [blame] | 78 | public_key: "com.android.runtime.avbpubkey", |
| 79 | private_key: "com.android.runtime.pem", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 80 | } |
| 81 | |
Roland Levillain | 3be7afe | 2018-12-04 19:35:03 +0000 | [diff] [blame] | 82 | prebuilt_etc { |
| 83 | name: "com.android.runtime.ld.config.txt", |
| 84 | src: "ld.config.txt", |
| 85 | filename: "ld.config.txt", |
| 86 | installable: false, |
| 87 | } |
| 88 | |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 89 | // TODO: Introduce `apex_defaults` to factor common parts of `apex` |
| 90 | // module definitions below? |
| 91 | |
| 92 | // Release version of the Runtime APEX module (not containing debug |
| 93 | // variants nor tools), included in user builds. Also used for |
| 94 | // storage-constrained devices in userdebug and eng builds. |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 95 | apex { |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 96 | name: "com.android.runtime.release", |
| 97 | compile_multilib: "both", |
| 98 | manifest: "manifest.json", |
| 99 | native_shared_libs: art_runtime_base_native_shared_libs |
| 100 | + art_runtime_fake_native_shared_libs, |
| 101 | multilib: { |
| 102 | both: { |
| 103 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 104 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
| 105 | binaries: art_runtime_base_binaries_both, |
| 106 | }, |
| 107 | prefer32: { |
| 108 | binaries: art_runtime_base_binaries_prefer32, |
| 109 | }, |
| 110 | first: { |
| 111 | binaries: [], |
| 112 | } |
| 113 | }, |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame^] | 114 | prebuilts: art_runtime_time_zone_prebuilts |
| 115 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 116 | key: "com.android.runtime.key", |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | // "Debug" version of the Runtime APEX module (containing both release and |
| 120 | // debug variants, as well as additional tools), included in userdebug and |
| 121 | // eng build. |
| 122 | apex { |
| 123 | name: "com.android.runtime.debug", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 124 | compile_multilib: "both", |
| 125 | manifest: "manifest.json", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 126 | native_shared_libs: art_runtime_base_native_shared_libs |
| 127 | + art_runtime_fake_native_shared_libs |
| 128 | + art_runtime_debug_native_shared_libs, |
| 129 | multilib: { |
| 130 | both: { |
| 131 | // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64` |
| 132 | // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp). |
| 133 | binaries: art_runtime_base_binaries_both, |
| 134 | }, |
| 135 | prefer32: { |
| 136 | binaries: art_runtime_base_binaries_prefer32 |
Roland Levillain | 5305880 | 2018-11-14 17:32:18 +0000 | [diff] [blame] | 137 | + art_runtime_debug_binaries_prefer32, |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 138 | }, |
| 139 | first: { |
| 140 | binaries: art_tools_binaries, |
| 141 | } |
| 142 | }, |
Neil Fuller | a886dab | 2018-12-06 15:12:52 +0000 | [diff] [blame^] | 143 | prebuilts: art_runtime_time_zone_prebuilts |
| 144 | + ["com.android.runtime.ld.config.txt"], |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 145 | key: "com.android.runtime.key", |
Roland Levillain | 38a938e | 2018-09-21 10:55:51 +0100 | [diff] [blame] | 146 | } |