Use shared libbase

Because the runtime apex already depends on libbase as shared object,
linkerconfig can use it as shared as well. This produces smaller
executable. On Cuttlefish, it reduces the size from 450632 to 328896.
It also affects the size of microdroid.img: 42893312 to 42668032.

Note that libbase is still statically linked on host since we want it to
have fewer external dependencies when running on host.

Bug: 262330207
Test: m linkerconfig
Test: MicrodroidTestApp
Change-Id: I3f2fd65626e270c3db30c892004ef068411dd10d
diff --git a/Android.bp b/Android.bp
index 37cecd1..f8fa281 100644
--- a/Android.bp
+++ b/Android.bp
@@ -26,9 +26,13 @@
         "-Wextra",
     ],
     defaults: ["libapexutil-deps"],
+    shared_libs: [
+        // Because the runtime apex depends on the shared libbase,
+        // linkerconfig can use it as shared as well to save more bits.
+        "libbase",
+    ],
     static_libs: [
         "libapexutil",
-        "libbase",
         "liblog_for_runtime_apex",
         "libprotobuf-cpp-lite",
         "libtinyxml2",
@@ -67,7 +71,6 @@
     ],
     generated_sources: ["apex-info-list-tinyxml"],
     apex_available: [
-        "//apex_available:platform",
         "com.android.runtime",
     ],
 }
@@ -87,7 +90,6 @@
         "contents/common/*.cc",
     ],
     apex_available: [
-        "//apex_available:platform",
         "com.android.runtime",
     ],
 }
@@ -104,7 +106,6 @@
         "generator/*.cc",
     ],
     apex_available: [
-        "//apex_available:platform",
         "com.android.runtime",
     ],
 }
@@ -130,8 +131,14 @@
     ],
     target: {
         host: {
-            // Link libc++ statically on host for convenience(no need to set library paths)
+            // Link libc++ and libbase statically on host for convenience(no need to set library paths)
             stl: "c++_static",
+            static_libs: [
+                "libbase",
+            ],
+            exclude_shared_libs: [
+                "libbase",
+            ],
         },
     },
 
@@ -142,7 +149,6 @@
     },
 
     apex_available: [
-        "//apex_available:platform",
         "com.android.runtime",
     ],
 }