blob: 05dba1524571e419d2788a709f744c11472d3518 [file] [log] [blame]
Tom Cherry37b5ada2017-05-12 17:05:22 -07001//
2// Copyright (C) 2017 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
17cc_defaults {
18 name: "fs_mgr_defaults",
19 sanitize: {
20 misc_undefined: ["integer"],
21 },
22 local_include_dirs: ["include/"],
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070023 cflags: [
24 "-Wall",
25 "-Werror",
26 "-Wno-unused-variable",
27 ],
Bowgo Tsai80281892017-12-12 00:47:43 +080028 cppflags: [
29 "-std=gnu++1z",
30 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070031}
32
33cc_library_static {
34 name: "libfs_mgr",
35 defaults: ["fs_mgr_defaults"],
36 export_include_dirs: ["include"],
37 include_dirs: ["system/vold"],
38 srcs: [
39 "fs_mgr.cpp",
40 "fs_mgr_dm_ioctl.cpp",
41 "fs_mgr_format.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070042 "fs_mgr_verity.cpp",
43 "fs_mgr_avb.cpp",
44 "fs_mgr_avb_ops.cpp",
David Anderson62e5b202018-05-01 17:09:17 -070045 "fs_mgr_dm_linear.cpp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090046 ],
47 static_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090048 "libfec",
49 "libfec_rs",
50 "libbase",
51 "libcrypto_utils",
52 "libcrypto",
53 "libext4_utils",
54 "libsquashfs_utils",
55 "libselinux",
56 "libavb",
57 "libfstab",
58 ],
59 export_static_lib_headers: [
60 "libfstab",
61 ],
62 whole_static_libs: [
Jin Qian42d81372017-04-21 16:56:34 -070063 "liblogwrap",
Jiyong Parke7df1f72017-06-28 11:17:30 +090064 "libfstab",
Tom Cherry37b5ada2017-05-12 17:05:22 -070065 ],
Tom Cherry31121ca2017-10-10 13:30:57 -070066 cppflags: [
Tom Cherry31121ca2017-10-10 13:30:57 -070067 "-DALLOW_ADBD_DISABLE_VERITY=0",
68 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070069 product_variables: {
70 debuggable: {
Tom Cherry31121ca2017-10-10 13:30:57 -070071 cppflags: [
72 "-UALLOW_ADBD_DISABLE_VERITY",
73 "-DALLOW_ADBD_DISABLE_VERITY=1",
74 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070075 },
Tom Cherry37b5ada2017-05-12 17:05:22 -070076 },
77}
Jiyong Parke7df1f72017-06-28 11:17:30 +090078
79cc_library_static {
80 name: "libfstab",
81 vendor_available: true,
82 defaults: ["fs_mgr_defaults"],
83 srcs: [
84 "fs_mgr_fstab.cpp",
85 "fs_mgr_boot_config.cpp",
86 "fs_mgr_slotselect.cpp",
87 ],
88 export_include_dirs: ["include_fstab"],
89 header_libs: ["libbase_headers"],
90}