Export libdexfile and dependencies for host.

They are needed e.g. by libunwindstack_unit_test on host.

Test: art/build/build-art-module.sh
Test: lunch aosp_x86_64 && atest --host libunwindstack_unit_test
  with and without SOONG_CONFIG_art_module_source_build=false in a tree
  with fresh prebuilts created by art/build/build-art-module.sh
Bug: 172480615
Change-Id: Ifb5fc74af5037999b97159830ba05c0063f1987a
diff --git a/build/sdk/Android.bp b/build/sdk/Android.bp
index 3d18e55..2bc60a0 100644
--- a/build/sdk/Android.bp
+++ b/build/sdk/Android.bp
@@ -212,6 +212,11 @@
                 "dex2oat",
                 "dex2oatd",
             ],
+            native_libs: [
+                "libdexfile", // libdexfile_external dependency
+                "libartpalette", // libdexfile dependency
+                "libartbase", // libdexfile dependency
+            ],
         },
 
         linux_bionic: {
diff --git a/libartbase/Android.bp b/libartbase/Android.bp
index c430c31..84f3418 100644
--- a/libartbase/Android.bp
+++ b/libartbase/Android.bp
@@ -168,6 +168,12 @@
         "art_pgo_defaults",
     ],
     visibility: [
+        // TODO(b/183483755): Please visibility checks when the prebuilt
+        // libartbase is present but not preferred, and the prebuilt libdexfile
+        // hence depends on the source instead.
+        // TODO(b/172480617): Alternatively, clean up when we no longer need to
+        // support both prebuilts and sources present simultaneously.
+        "//prebuilts/module_sdk/art/current/host-exports",
         // TODO(b/133140750): Clean this up.
         "//packages/modules/NetworkStack/tests:__subpackages__",
     ],
diff --git a/libartpalette/Android.bp b/libartpalette/Android.bp
index 649ffa1..2f41cf6 100644
--- a/libartpalette/Android.bp
+++ b/libartpalette/Android.bp
@@ -46,6 +46,14 @@
 art_cc_library {
     name: "libartpalette",
     defaults: ["libartpalette_defaults"],
+    visibility: [
+        // TODO(b/183483755): Please visibility checks when the prebuilt
+        // libartpalette is present but not preferred, and the prebuilt
+        // libdexfile hence depends on the source instead.
+        // TODO(b/172480617): Alternatively, clean up when we no longer need to
+        // support both prebuilts and sources present simultaneously.
+        "//prebuilts/module_sdk/art/current/host-exports",
+    ],
     header_libs: ["libbase_headers"],
     target: {
         // Targets supporting dlopen build the client library which loads