blob: 824511e57f01d748ecde26629e6cb385a1ea7225 [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",
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070026 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070027}
28
Tao Baoa9fad6c2018-07-25 13:07:31 -070029cc_library {
Tom Cherry066fcdf2018-08-14 12:57:05 -070030 // Do not ever allow this library to be vendor_available as a shared library.
31 // It does not have a stable interface.
Tom Cherry37b5ada2017-05-12 17:05:22 -070032 name: "libfs_mgr",
33 defaults: ["fs_mgr_defaults"],
Jiyong Parka0e75042018-05-24 14:11:00 +090034 recovery_available: true,
Tom Cherry37b5ada2017-05-12 17:05:22 -070035 export_include_dirs: ["include"],
36 include_dirs: ["system/vold"],
37 srcs: [
38 "fs_mgr.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070039 "fs_mgr_format.cpp",
Tom Cherry37b5ada2017-05-12 17:05:22 -070040 "fs_mgr_verity.cpp",
David Anderson62e5b202018-05-01 17:09:17 -070041 "fs_mgr_dm_linear.cpp",
Mark Salyzynb28389f2018-06-06 13:10:40 -070042 "fs_mgr_overlayfs.cpp",
Yifan Hongbf80e7d2018-12-03 13:46:56 -080043 "fs_mgr_roots.cpp",
Justin Yun6bab0a92018-10-29 18:31:48 +090044 "fs_mgr_vendor_overlay.cpp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090045 ],
Tao Baoa9fad6c2018-07-25 13:07:31 -070046 shared_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090047 "libbase",
Jiyong Parke7df1f72017-06-28 11:17:30 +090048 "libcrypto",
Tao Bao7aa46082018-08-13 22:25:34 -070049 "libcrypto_utils",
Tao Baoa9fad6c2018-07-25 13:07:31 -070050 "libcutils",
Jiyong Parke7df1f72017-06-28 11:17:30 +090051 "libext4_utils",
Tao Bao7aa46082018-08-13 22:25:34 -070052 "libfec",
Tao Baoa9fad6c2018-07-25 13:07:31 -070053 "liblog",
David Andersonf792e412018-07-27 16:05:31 -070054 "liblp",
Tao Bao7aa46082018-08-13 22:25:34 -070055 "libselinux",
Tao Baoa9fad6c2018-07-25 13:07:31 -070056 ],
57 static_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090058 "libavb",
Bowgo Tsaic1bc2812018-11-26 17:49:23 +080059 "libfs_avb",
Jiyong Parke7df1f72017-06-28 11:17:30 +090060 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070061 "libdm",
Jiyong Parke7df1f72017-06-28 11:17:30 +090062 ],
63 export_static_lib_headers: [
Bowgo Tsaic1bc2812018-11-26 17:49:23 +080064 "libfs_avb",
Jiyong Parke7df1f72017-06-28 11:17:30 +090065 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070066 "libdm",
David Andersonf792e412018-07-27 16:05:31 -070067 ],
68 export_shared_lib_headers: [
David Andersonea3b8ac2018-06-07 15:36:09 -070069 "liblp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090070 ],
71 whole_static_libs: [
Jin Qian42d81372017-04-21 16:56:34 -070072 "liblogwrap",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070073 "libdm",
Jiyong Parke7df1f72017-06-28 11:17:30 +090074 "libfstab",
Tom Cherry37b5ada2017-05-12 17:05:22 -070075 ],
Tom Cherry31121ca2017-10-10 13:30:57 -070076 cppflags: [
Tom Cherry31121ca2017-10-10 13:30:57 -070077 "-DALLOW_ADBD_DISABLE_VERITY=0",
78 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070079 product_variables: {
80 debuggable: {
Tom Cherry31121ca2017-10-10 13:30:57 -070081 cppflags: [
82 "-UALLOW_ADBD_DISABLE_VERITY",
83 "-DALLOW_ADBD_DISABLE_VERITY=1",
84 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070085 },
Tom Cherry37b5ada2017-05-12 17:05:22 -070086 },
87}
Jiyong Parke7df1f72017-06-28 11:17:30 +090088
89cc_library_static {
Tom Cherry066fcdf2018-08-14 12:57:05 -070090 // Do not ever make this a shared library as long as it is vendor_available.
91 // It does not have a stable interface.
Jiyong Parke7df1f72017-06-28 11:17:30 +090092 name: "libfstab",
93 vendor_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +090094 recovery_available: true,
Jiyong Parke7df1f72017-06-28 11:17:30 +090095 defaults: ["fs_mgr_defaults"],
96 srcs: [
97 "fs_mgr_fstab.cpp",
98 "fs_mgr_boot_config.cpp",
99 "fs_mgr_slotselect.cpp",
100 ],
101 export_include_dirs: ["include_fstab"],
102 header_libs: ["libbase_headers"],
103}
Bowgo Tsaic1bc2812018-11-26 17:49:23 +0800104
105cc_library_static {
106 name: "libfs_avb",
107 defaults: ["fs_mgr_defaults"],
108 recovery_available: true,
109 export_include_dirs: ["libfs_avb/include"],
110 srcs: [
111 "libfs_avb/avb_ops.cpp",
112 "libfs_avb/fs_avb.cpp",
113 ],
114 static_libs: [
115 "libavb",
116 "libfstab",
117 "libdm",
118 ],
119 export_static_lib_headers: [
120 "libfstab",
121 ],
122 shared_libs: [
123 "libcrypto",
124 ],
125 header_libs: [
126 "libbase_headers",
127 ],
128}