1// Copyright 2010 The Android Open Source Project
2
3package {
4    default_applicable_licenses: ["system_extras_ext4_utils_license"],
5}
6
7// Added automatically by a large-scale-change
8// See: http://go/android-license-faq
9license {
10    name: "system_extras_ext4_utils_license",
11    visibility: [":__subpackages__"],
12    license_kinds: [
13        "SPDX-license-identifier-Apache-2.0",
14    ],
15    license_text: [
16        "NOTICE",
17    ],
18}
19
20cc_library {
21    name: "libext4_utils",
22    host_supported: true,
23    recovery_available: true,
24    srcs: [
25        "ext4_utils.cpp",
26        "wipe.cpp",
27        "ext4_sb.cpp",
28    ],
29    // Various instances of dereferencing a type-punned pointer in extent.c
30    cflags: [
31        "-Werror",
32        "-fno-strict-aliasing",
33    ],
34    export_include_dirs: ["include"],
35    shared_libs: [
36        "libbase",
37        "libz",
38    ],
39
40    target: {
41        windows: {
42            host_ldlibs: ["-lws2_32"],
43            enabled: true,
44        },
45
46        android: {
47            shared_libs: [
48                "libbase",
49            ],
50
51            shared: {
52                cflags: ["-DREAL_UUID"],
53                shared_libs: [
54                    "libcutils",
55                    "libext2_uuid",
56                ],
57            },
58        },
59    },
60}
61
62python_binary_host {
63    name: "mkuserimg_mke2fs",
64    srcs: [
65        "mkuserimg_mke2fs.py",
66    ],
67
68    data: [
69        "mke2fs.conf",
70    ],
71
72    version: {
73        py2: {
74            enabled: true,
75            embedded_launcher: true,
76        },
77        py3: {
78            enabled: false,
79            embedded_launcher: false,
80        },
81    },
82
83    required: [
84        "mke2fs",
85        "e2fsdroid",
86    ],
87}
88
89prebuilt_etc {
90    name: "mke2fs.conf",
91    recovery_available: true,
92    src: "mke2fs.conf",
93}
94
95// TODO(b/157625953): Can't embedded into the other package because of missing variant
96filegroup {
97    name: "mke2fs_conf",
98    srcs: [
99        "mke2fs.conf",
100    ],
101    visibility: [
102        "//system/apex/apexer",
103    ],
104}
105
106cc_binary_host {
107    name: "blk_alloc_to_base_fs",
108    srcs: ["blk_alloc_to_base_fs.cpp"],
109    shared_libs: ["libcutils"],
110    target: {
111        host: {
112            cflags: ["-DHOST"],
113        },
114    },
115    cflags: [
116        "-Wall",
117        "-Werror",
118    ],
119}
120