Whamcloud - gitweb
AOSP: tune2fs, resize2fs: make ramdisk binaries.
authorJaegeuk Kim <jaegeuk@google.com>
Wed, 12 Feb 2020 19:34:49 +0000 (11:34 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 21 Mar 2020 03:19:24 +0000 (23:19 -0400)
Bug: 149391799
Change-Id: I5183755915710e28a603e3f718f16813ea9991a0
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
From AOSP commit: a13a88d0d557a396f63702fb8db008487e2384d7

misc/Android.bp
resize/Android.bp

index c873c10..a93bea4 100644 (file)
@@ -143,6 +143,16 @@ cc_binary {
     static_libs: tune2fs_libs,
 }
 
+cc_binary {
+    name: "tune2fs_ramdisk",
+    stem: "tune2fs",
+    static_executable: true,
+    ramdisk: true,
+    defaults: ["tune2fs-defaults"],
+    system_shared_libs: [],
+    static_libs: tune2fs_libs,
+}
+
 cc_library_static {
     name: "libtune2fs",
     defaults: ["tune2fs-defaults"],
index 399201c..8acdcf6 100644 (file)
@@ -1,10 +1,16 @@
 // Copyright 2017 The Android Open Source Project
 
-cc_binary {
-    name: "resize2fs",
-    host_supported: true,
-    defaults: ["e2fsprogs-defaults"],
+resize2fs_libs = [
+    "libext2fs",
+    "libext2_com_err",
+    "libext2_e2p",
+    "libext2_uuid",
+    "libext2_blkid",
+]
 
+cc_defaults {
+    name: "resize2fs-defaults",
+    defaults: ["e2fsprogs-defaults"],
     srcs: [
         "extent.c",
         "resize2fs.c",
@@ -13,27 +19,32 @@ cc_binary {
         "sim_progress.c",
         "resource_track.c",
     ],
+}
+
+cc_binary {
+    name: "resize2fs",
+    host_supported: true,
+    defaults: ["resize2fs-defaults"],
+
     // 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",
-            ],
+            static_libs: resize2fs_libs,
         },
         android: {
-            shared_libs: [
-                "libext2fs",
-                "libext2_com_err",
-                "libext2_e2p",
-                "libext2_uuid",
-                "libext2_blkid",
-            ],
+            shared_libs: resize2fs_libs,
         },
     },
     system_shared_libs: ["libc", "libdl"],
 }
+
+cc_binary {
+    name: "resize2fs_ramdisk",
+    stem: "resize2fs",
+    static_executable: true,
+    ramdisk: true,
+    defaults: ["resize2fs-defaults"],
+    system_shared_libs: [],
+    static_libs: resize2fs_libs,
+}