Update apex rules for dex2oatd

The apex rules need to stay in line with the compile_multilib state of
the modules they reference. This updates the rules to have the correct
state for dex2oatd. These are also needed to correctly handle the new
symlinks that will be included in the apex files.

Test: m com.android.runtime.host
Test: m com.android.runtime.debug
Test: ./art/build/apex/runtests.sh

Bug: 119942078
Bug: 122373634
Bug: 123079311
Change-Id: Ic58be88320b853f8e89e6aeea1891a897f898ae2
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 9bf6551..d35ceae 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -30,10 +30,16 @@
 ]
 // - Debug variants (binaries for which a 32-bit version is preferred).
 art_runtime_debug_binaries_prefer32 = [
-    "dex2oatd",
     "dexoptanalyzerd",
     "profmand",
 ]
+art_runtime_debug_binaries_prefer32_device = [
+    "dex2oatd",
+]
+art_runtime_debug_binaries_both_host = [
+    "dex2oatd",
+]
+
 // - Debug variants (libraries).
 art_runtime_debug_native_shared_libs = [
     "libartd",
@@ -162,7 +168,8 @@
         },
         prefer32: {
             binaries: art_runtime_base_binaries_prefer32
-                + art_runtime_debug_binaries_prefer32,
+                + art_runtime_debug_binaries_prefer32
+                + art_runtime_debug_binaries_prefer32_device,
         },
         first: {
             binaries: art_tools_device_binaries,
@@ -193,7 +200,8 @@
         both: {
             // TODO: Add logic to create a `dalvikvm` symlink to `dalvikvm32` or `dalvikvm64`
             // (see `symlink_preferred_arch` in art/dalvikvm/Android.bp).
-            binaries: art_runtime_base_binaries_both,
+            binaries: art_runtime_base_binaries_both
+                + art_runtime_debug_binaries_both_host,
         },
         first: {
             binaries: art_tools_host_binaries