blob: 6167cde9fbc6366f2fc191f90082582411dcea6c [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
Tao Baoa9fad6c2018-07-25 13:07:31 -070033cc_library {
Tom Cherry066fcdf2018-08-14 12:57:05 -070034 // Do not ever allow this library to be vendor_available as a shared library.
35 // It does not have a stable interface.
Tom Cherry37b5ada2017-05-12 17:05:22 -070036 name: "libfs_mgr",
37 defaults: ["fs_mgr_defaults"],
Jiyong Parka0e75042018-05-24 14:11:00 +090038 recovery_available: true,
Tom Cherry37b5ada2017-05-12 17:05:22 -070039 export_include_dirs: ["include"],
40 include_dirs: ["system/vold"],
41 srcs: [
42 "fs_mgr.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070043 "fs_mgr_format.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070044 "fs_mgr_verity.cpp",
45 "fs_mgr_avb.cpp",
46 "fs_mgr_avb_ops.cpp",
David Anderson62e5b202018-05-01 17:09:17 -070047 "fs_mgr_dm_linear.cpp",
Mark Salyzynb28389f2018-06-06 13:10:40 -070048 "fs_mgr_overlayfs.cpp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090049 ],
Tao Baoa9fad6c2018-07-25 13:07:31 -070050 shared_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090051 "libfec",
52 "libfec_rs",
53 "libbase",
54 "libcrypto_utils",
55 "libcrypto",
Tao Baoa9fad6c2018-07-25 13:07:31 -070056 "libcutils",
Jiyong Parke7df1f72017-06-28 11:17:30 +090057 "libext4_utils",
Tao Baoa9fad6c2018-07-25 13:07:31 -070058 "libkeyutils",
59 "liblog",
Jiyong Parke7df1f72017-06-28 11:17:30 +090060 "libsquashfs_utils",
61 "libselinux",
David Andersonf792e412018-07-27 16:05:31 -070062 "liblp",
Tao Baoa9fad6c2018-07-25 13:07:31 -070063 ],
64 static_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090065 "libavb",
66 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070067 "libdm",
Jiyong Parke7df1f72017-06-28 11:17:30 +090068 ],
69 export_static_lib_headers: [
70 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070071 "libdm",
David Andersonf792e412018-07-27 16:05:31 -070072 ],
73 export_shared_lib_headers: [
David Andersonea3b8ac2018-06-07 15:36:09 -070074 "liblp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090075 ],
76 whole_static_libs: [
Jin Qian42d81372017-04-21 16:56:34 -070077 "liblogwrap",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070078 "libdm",
Jiyong Parke7df1f72017-06-28 11:17:30 +090079 "libfstab",
Tom Cherry37b5ada2017-05-12 17:05:22 -070080 ],
Tom Cherry31121ca2017-10-10 13:30:57 -070081 cppflags: [
Tom Cherry31121ca2017-10-10 13:30:57 -070082 "-DALLOW_ADBD_DISABLE_VERITY=0",
83 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070084 product_variables: {
85 debuggable: {
Tom Cherry31121ca2017-10-10 13:30:57 -070086 cppflags: [
87 "-UALLOW_ADBD_DISABLE_VERITY",
88 "-DALLOW_ADBD_DISABLE_VERITY=1",
89 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070090 },
Tom Cherry37b5ada2017-05-12 17:05:22 -070091 },
92}
Jiyong Parke7df1f72017-06-28 11:17:30 +090093
94cc_library_static {
Tom Cherry066fcdf2018-08-14 12:57:05 -070095 // Do not ever make this a shared library as long as it is vendor_available.
96 // It does not have a stable interface.
Jiyong Parke7df1f72017-06-28 11:17:30 +090097 name: "libfstab",
98 vendor_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +090099 recovery_available: true,
Jiyong Parke7df1f72017-06-28 11:17:30 +0900100 defaults: ["fs_mgr_defaults"],
101 srcs: [
102 "fs_mgr_fstab.cpp",
103 "fs_mgr_boot_config.cpp",
104 "fs_mgr_slotselect.cpp",
105 ],
106 export_include_dirs: ["include_fstab"],
107 header_libs: ["libbase_headers"],
108}