Merge "Allow resize2fs to compile with BUILD_HOST_static" am: e2c8b268cf am: f60518df5e

Change-Id: I10d8a70a0d37da95953b7b970ac7c632ba1c1e39
diff --git a/resize/Android.bp b/resize/Android.bp
index d55e24c..399201c 100644
--- a/resize/Android.bp
+++ b/resize/Android.bp
@@ -13,12 +13,27 @@
         "sim_progress.c",
         "resource_track.c",
     ],
-    shared_libs: [
-        "libext2fs",
-        "libext2_com_err",
-        "libext2_e2p",
-        "libext2_uuid",
-        "libext2_blkid",
-    ],
+    // Host binaries can be compiled statically to be re-used in other environments.
+    // For android binaries, we keep shared libraries to keep the binary size smaller.
+    target: {
+        host: {
+            static_libs: [
+                "libext2fs",
+                "libext2_com_err",
+                "libext2_e2p",
+                "libext2_uuid",
+                "libext2_blkid",
+            ],
+        },
+        android: {
+            shared_libs: [
+                "libext2fs",
+                "libext2_com_err",
+                "libext2_e2p",
+                "libext2_uuid",
+                "libext2_blkid",
+            ],
+        },
+    },
     system_shared_libs: ["libc", "libdl"],
 }