Whamcloud - gitweb
ci.yml: use actions/checkout@v3 to switch to using Node 16
[tools/e2fsprogs.git] / e2fsck / Android.bp
index 0edf987..22396c4 100644 (file)
@@ -3,8 +3,20 @@
 //########################
 // Build the e2fsck binary
 
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "external_e2fsprogs_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-GPL
+    //   SPDX-license-identifier-GPL-2.0
+    //   SPDX-license-identifier-LGPL
+    default_applicable_licenses: ["external_e2fsprogs_license"],
+}
+
 cc_defaults {
     name: "e2fsck-defaults",
+    defaults: ["e2fsprogs-defaults"],
     srcs: [
         "e2fsck.c",
         "super.c",
@@ -33,26 +45,31 @@ cc_defaults {
         "sigcatcher.c",
         "readahead.c",
         "extents.c",
+        "encrypted_files.c",
+    ],
+    cflags: [
+        "-Wno-sign-compare",
+        "-fno-strict-aliasing",
     ],
-    cflags: ["-W", "-Wall", "-Wno-macro-redefined", "-fno-strict-aliasing"],
 }
 
 e2fsck_libs = [
     "libext2fs",
     "libext2_blkid",
+    "libext2_com_err",
     "libext2_uuid",
     "libext2_quota",
-    "libext2_com_err",
     "libext2_e2p",
 ]
 
 cc_binary {
     name: "e2fsck",
     host_supported: true,
+    vendor_ramdisk_available: true,
     defaults: ["e2fsck-defaults"],
 
     shared_libs: e2fsck_libs,
-    system_shared_libs: ["libc", "libdl"],
+    required: ["badblocks"],
 }
 
 cc_binary {
@@ -60,5 +77,14 @@ cc_binary {
     static_executable: true,
     defaults: ["e2fsck-defaults"],
 
-    static_libs: e2fsck_libs + ["libc"],
+    static_libs: e2fsck_libs,
+}
+
+cc_binary {
+    name: "e2fsck_ramdisk",
+    stem: "e2fsck",
+    static_executable: true,
+    ramdisk: true,
+    defaults: ["e2fsck-defaults"],
+    static_libs: e2fsck_libs,
 }