]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
AOSP: build static version of mke2fs and e2fsdroid for host
authorJin Qian <jinqian@google.com>
Wed, 12 Jul 2017 20:29:38 +0000 (13:29 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 26 Feb 2018 17:22:55 +0000 (12:22 -0500)
Statically link those two binaries for host build so that we can
package them with fastboot without including other library files.

Bug: 35219933
Change-Id: Ic4762ba5eda8ac61723a2c4137690d12a0aa57f2
From AOSP commit: 42297fb01aa2a49ead938c1d24868941a39fd434

contrib/android/Android.bp
misc/Android.bp

index afa335e0d325e1579b9ae834ec73d371e664b746..18d3850177b1b928ddf166af159413492ea379cd 100644 (file)
@@ -18,15 +18,34 @@ cc_binary {
         "hashmap.c",
     ],
     cflags: ["-W", "-Wall"],
-    shared_libs: [
-        "libext2fs",
-        "libext2_com_err",
-        "libext2_misc",
-        "libcutils",
-        "libbase",
-        "libselinux",
-        "libcrypto",
-    ],
+    target: {
+        host: {
+            static_libs: [
+                "libext2_com_err",
+                "libext2_misc",
+                "libext2fs",
+                "libsparse",
+                "libz",
+                "libcutils",
+                "libbase",
+                "libselinux",
+                "libcrypto",
+                "liblog",
+            ],
+        },
+        android: {
+            shared_libs: [
+                "libext2fs",
+                "libext2_com_err",
+                "libext2_misc",
+                "libcutils",
+                "libbase",
+                "libselinux",
+                "libcrypto",
+            ],
+        },
+    },
+    stl: "libc++_static",
 }
 
 //##########################################################################
index 5fc87027eb6e7538cc2e05ea1d642e7945eae2f8..e388d1ef477e11143b15ebf5582d239d4069cdee 100644 (file)
@@ -35,16 +35,34 @@ cc_binary {
         "mke2fs.conf",
     ],
     cflags: ["-W", "-Wall", "-Wno-macro-redefined"],
-    shared_libs: [
-        "libext2fs",
-        "libext2_blkid",
-        "libext2_misc",
-        "libext2_uuid",
-        "libext2_quota",
-        "libext2_com_err",
-        "libext2_e2p",
-    ],
-    system_shared_libs: ["libc"],
+    target: {
+        host: {
+            static_libs: [
+                "libext2_blkid",
+                "libext2_misc",
+                "libext2_uuid",
+                "libext2_quota",
+                "libext2_com_err",
+                "libext2_e2p",
+                "libext2fs",
+                "libsparse",
+                "libbase",
+                "libz",
+            ],
+        },
+        android: {
+            shared_libs: [
+                "libext2fs",
+                "libext2_blkid",
+                "libext2_misc",
+                "libext2_uuid",
+                "libext2_quota",
+                "libext2_com_err",
+                "libext2_e2p",
+            ],
+        },
+    },
+    stl: "libc++_static",
     include_dirs: ["external/e2fsprogs/e2fsck"],
 }