Make the Host ART APEX have similar requirements w.r.t. dex2oat and dex2oatd.
Recent changes in the build system have made `dex2oat` more similar to
`dex2oatd` w.r.t. build rules. Echo these changes in the definition of
the Host ART APEX (`com.android.art.host`).
Test: art/build/apex/runtests.sh
Bug: 148372405
Bug: 149749169
Change-Id: I125083af7752ed41b5af89e8cc384bab7cc9d48d
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 738a870..3cd1347 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -4,16 +4,32 @@
// (Libcore).
// Modules listed in LOCAL_REQUIRED_MODULES for module art-runtime in art/Android.mk.
-// - Base requirements (binaries for which both 32- and 64-bit versions are built, if relevant).
+// - Base requirements (binaries for which both 32- and 64-bit versions are built, if possible).
art_runtime_base_binaries_both = [
"dalvikvm",
]
-// - Base requirements (binaries for which a 32-bit version is preferred).
-art_runtime_base_binaries_prefer32 = [
- "dex2oat",
+// - Base requirements (binaries for which a 32-bit version is preferred on device, but for which
+// only the "first" (likely 64-bit) version is required on host).
+art_runtime_base_binaries_prefer32_on_device_first_on_host = [
"dexoptanalyzer",
"profman",
]
+// - Base requirements (binaries for which a 32-bit version is preferred on device, but for which
+// "both" versions (32- and 64-bit, if possible) are required on host).
+art_runtime_base_binaries_prefer32_on_device_both_on_host = [
+ "dex2oat",
+]
+
+art_runtime_base_binaries_prefer32_on_device =
+ art_runtime_base_binaries_prefer32_on_device_first_on_host +
+ art_runtime_base_binaries_prefer32_on_device_both_on_host
+
+art_runtime_base_binaries_both_on_host =
+ art_runtime_base_binaries_prefer32_on_device_both_on_host
+
+art_runtime_base_binaries_first_on_host =
+ art_runtime_base_binaries_prefer32_on_device_first_on_host
+
// - Base requirements (libraries).
//
// Note: ART on-device chroot-based testing and benchmarking is not yet using
@@ -61,18 +77,27 @@
"linker",
]
-// - Debug variants (binaries for which a 32-bit version is preferred).
-art_runtime_debug_binaries_prefer32 = [
+// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which
+// only the "first" (likely 64-bit) version is required on host).
+art_runtime_debug_binaries_prefer32_on_device_first_on_host = [
"dexoptanalyzerd",
"profmand",
]
-art_runtime_debug_binaries_prefer32_device = [
+// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which
+// "both" versions (32- and 64-bit, if possible) are required on host).
+art_runtime_debug_binaries_prefer32_on_device_both_on_host = [
"dex2oatd",
]
-art_runtime_debug_binaries_both_host = [
- "dex2oatd",
-]
+art_runtime_debug_binaries_prefer32_on_device =
+ art_runtime_debug_binaries_prefer32_on_device_first_on_host +
+ art_runtime_debug_binaries_prefer32_on_device_both_on_host
+
+art_runtime_debug_binaries_both_on_host =
+ art_runtime_debug_binaries_prefer32_on_device_both_on_host
+
+art_runtime_debug_binaries_first_on_host =
+ art_runtime_debug_binaries_prefer32_on_device_first_on_host
// - Debug variants (libraries).
art_runtime_debug_native_shared_libs = [
@@ -221,7 +246,7 @@
binaries: art_runtime_base_binaries_both,
},
prefer32: {
- binaries: art_runtime_base_binaries_prefer32,
+ binaries: art_runtime_base_binaries_prefer32_on_device
},
first: {
binaries: art_tools_common_binaries +
@@ -249,8 +274,7 @@
binaries: art_tools_debug_binaries_both,
},
prefer32: {
- binaries: art_runtime_debug_binaries_prefer32 +
- art_runtime_debug_binaries_prefer32_device,
+ binaries: art_runtime_debug_binaries_prefer32_on_device,
},
first: {
binaries: art_tools_debug_binaries +
@@ -336,15 +360,17 @@
multilib: {
both: {
binaries: art_runtime_base_binaries_both +
- art_runtime_debug_binaries_both_host +
+ art_runtime_base_binaries_both_on_host +
+ art_runtime_debug_binaries_both_on_host +
art_tools_debug_binaries_both,
},
first: {
- binaries: art_tools_common_binaries + // Host APEX is always debug.
- art_tools_debug_binaries +
- art_tools_host_only_binaries +
- art_runtime_base_binaries_prefer32 +
- art_runtime_debug_binaries_prefer32,
+ binaries:
+ art_runtime_base_binaries_first_on_host +
+ art_runtime_debug_binaries_first_on_host +
+ art_tools_common_binaries +
+ art_tools_debug_binaries + // Host APEX is always debug.
+ art_tools_host_only_binaries,
},
},
key: "com.android.art.key",
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index e0b28bd..bc0de41 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -614,6 +614,7 @@
def run(self):
# Check binaries for ART.
self._checker.check_executable('hprof-conv')
+ self._checker.check_symlinked_multilib_executable('dex2oat')
self._checker.check_symlinked_multilib_executable('dex2oatd')
# Check exported native libraries for Managed Core Library.