xref: /aosp_15_r20/system/core/fs_mgr/libdm/Android.bp (revision 00c7fec1bb09f3284aad6a6f96d2f63dfc3650ad)
1//
2// Copyright (C) 2018 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_team: "trendy_team_android_kernel",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22cc_library_static {
23    name: "libdm",
24    defaults: ["fs_mgr_defaults"],
25    recovery_available: true,
26    host_supported: true,
27
28    export_include_dirs: ["include"],
29
30    srcs: [
31        "dm_table.cpp",
32        "dm_target.cpp",
33        "dm.cpp",
34        "loop_control.cpp",
35        "utility.cpp",
36    ],
37
38    static_libs: [
39        "libext2_uuid",
40    ],
41    header_libs: [
42        "libbase_headers",
43        "liblog_headers",
44    ],
45    target: {
46        darwin: {
47            enabled: false,
48        },
49    },
50    ramdisk_available: true,
51    vendor_ramdisk_available: true,
52}
53
54filegroup {
55    name: "libdm_test_srcs",
56    srcs: [
57        "dm_test.cpp",
58        "loop_control_test.cpp",
59        "test_util.cpp",
60    ],
61}
62
63cc_defaults {
64    name: "libdm_test_defaults",
65    defaults: ["fs_mgr_defaults"],
66    static_libs: [
67        "libdm",
68        "libext2_uuid",
69        "libfs_mgr",
70    ],
71    shared_libs: [
72        "libbase",
73        "liblog",
74    ],
75    header_libs: [
76        "libstorage_literals_headers",
77    ],
78    srcs: [":libdm_test_srcs"],
79    auto_gen_config: true,
80    require_root: true,
81}
82
83cc_test {
84    name: "libdm_test",
85    defaults: ["libdm_test_defaults"],
86    test_suites: ["device-tests"],
87}
88
89cc_test {
90    name: "vts_libdm_test",
91    defaults: ["libdm_test_defaults"],
92    test_suites: ["vts"],
93    test_options: {
94        min_shipping_api_level: 29,
95    },
96}
97