blob: f150af327a30f73a41db03c96a09eca696b5b165 [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",
David Anderson62e5b202018-05-01 17:09:17 -070045 "fs_mgr_dm_linear.cpp",
Mark Salyzynb28389f2018-06-06 13:10:40 -070046 "fs_mgr_overlayfs.cpp",
Justin Yun6bab0a92018-10-29 18:31:48 +090047 "fs_mgr_vendor_overlay.cpp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090048 ],
Tao Baoa9fad6c2018-07-25 13:07:31 -070049 shared_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090050 "libbase",
Jiyong Parke7df1f72017-06-28 11:17:30 +090051 "libcrypto",
Tao Bao7aa46082018-08-13 22:25:34 -070052 "libcrypto_utils",
Tao Baoa9fad6c2018-07-25 13:07:31 -070053 "libcutils",
Jiyong Parke7df1f72017-06-28 11:17:30 +090054 "libext4_utils",
Tao Bao7aa46082018-08-13 22:25:34 -070055 "libfec",
Tao Baoa9fad6c2018-07-25 13:07:31 -070056 "liblog",
David Andersonf792e412018-07-27 16:05:31 -070057 "liblp",
Tao Bao7aa46082018-08-13 22:25:34 -070058 "libselinux",
Tao Baoa9fad6c2018-07-25 13:07:31 -070059 ],
60 static_libs: [
Jiyong Parke7df1f72017-06-28 11:17:30 +090061 "libavb",
Bowgo Tsaic1bc2812018-11-26 17:49:23 +080062 "libfs_avb",
Jiyong Parke7df1f72017-06-28 11:17:30 +090063 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070064 "libdm",
Jiyong Parke7df1f72017-06-28 11:17:30 +090065 ],
66 export_static_lib_headers: [
Bowgo Tsaic1bc2812018-11-26 17:49:23 +080067 "libfs_avb",
Jiyong Parke7df1f72017-06-28 11:17:30 +090068 "libfstab",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070069 "libdm",
David Andersonf792e412018-07-27 16:05:31 -070070 ],
71 export_shared_lib_headers: [
David Andersonea3b8ac2018-06-07 15:36:09 -070072 "liblp",
Jiyong Parke7df1f72017-06-28 11:17:30 +090073 ],
74 whole_static_libs: [
Jin Qian42d81372017-04-21 16:56:34 -070075 "liblogwrap",
Sandeep Patil59f04ee2018-05-30 13:46:55 -070076 "libdm",
Jiyong Parke7df1f72017-06-28 11:17:30 +090077 "libfstab",
Tom Cherry37b5ada2017-05-12 17:05:22 -070078 ],
Tom Cherry31121ca2017-10-10 13:30:57 -070079 cppflags: [
Tom Cherry31121ca2017-10-10 13:30:57 -070080 "-DALLOW_ADBD_DISABLE_VERITY=0",
81 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070082 product_variables: {
83 debuggable: {
Tom Cherry31121ca2017-10-10 13:30:57 -070084 cppflags: [
85 "-UALLOW_ADBD_DISABLE_VERITY",
86 "-DALLOW_ADBD_DISABLE_VERITY=1",
87 ],
Tom Cherry37b5ada2017-05-12 17:05:22 -070088 },
Tom Cherry37b5ada2017-05-12 17:05:22 -070089 },
90}
Jiyong Parke7df1f72017-06-28 11:17:30 +090091
92cc_library_static {
Tom Cherry066fcdf2018-08-14 12:57:05 -070093 // Do not ever make this a shared library as long as it is vendor_available.
94 // It does not have a stable interface.
Jiyong Parke7df1f72017-06-28 11:17:30 +090095 name: "libfstab",
96 vendor_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +090097 recovery_available: true,
Jiyong Parke7df1f72017-06-28 11:17:30 +090098 defaults: ["fs_mgr_defaults"],
99 srcs: [
100 "fs_mgr_fstab.cpp",
101 "fs_mgr_boot_config.cpp",
102 "fs_mgr_slotselect.cpp",
103 ],
104 export_include_dirs: ["include_fstab"],
105 header_libs: ["libbase_headers"],
106}
Bowgo Tsaic1bc2812018-11-26 17:49:23 +0800107
108cc_library_static {
109 name: "libfs_avb",
110 defaults: ["fs_mgr_defaults"],
111 recovery_available: true,
112 export_include_dirs: ["libfs_avb/include"],
113 srcs: [
114 "libfs_avb/avb_ops.cpp",
115 "libfs_avb/fs_avb.cpp",
116 ],
117 static_libs: [
118 "libavb",
119 "libfstab",
120 "libdm",
121 ],
122 export_static_lib_headers: [
123 "libfstab",
124 ],
125 shared_libs: [
126 "libcrypto",
127 ],
128 header_libs: [
129 "libbase_headers",
130 ],
131}