blob: dd69bd0c71880ba59d6de80faade3de2a6b1b1b7 [file] [log] [blame]
Dan Willemsen4c939742016-12-06 15:44:57 -08001cc_defaults {
2 name: "installd_defaults",
3
4 cflags: [
5 "-Wall",
6 "-Werror",
Jeff Sharkeyc1149c92017-09-21 14:51:09 -06007 "-Wextra",
Andreas Gampefa2dadd2018-02-28 19:52:47 -08008
9 "-Wunreachable-code",
10 "-Wunreachable-code-break",
11 "-Wunreachable-code-return",
Dan Willemsen4c939742016-12-06 15:44:57 -080012 ],
13 srcs: [
Jeff Sharkey88ddd942017-01-17 18:05:54 -070014 "CacheItem.cpp",
15 "CacheTracker.cpp",
Jeff Sharkeyf3e30b92016-12-09 17:06:57 -070016 "InstalldNativeService.cpp",
Risan5f308262018-10-26 12:06:58 -060017 "QuotaUtils.cpp",
Jeff Sharkey6c2c0562016-12-07 12:12:00 -070018 "dexopt.cpp",
Dan Willemsen4c939742016-12-06 15:44:57 -080019 "globals.cpp",
20 "utils.cpp",
Eric Holk2af5e6a2019-01-09 18:17:27 -080021 "view_compiler.cpp",
Colin Crossdd2dae92017-11-14 13:05:37 -080022 ":installd_aidl",
Dan Willemsen4c939742016-12-06 15:44:57 -080023 ],
Andreas Gampefa2dadd2018-02-28 19:52:47 -080024 header_libs: [
25 "dex2oat_headers",
26 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080027 shared_libs: [
28 "libbase",
29 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010030 "libcrypto",
Dan Willemsen4c939742016-12-06 15:44:57 -080031 "libcutils",
32 "liblog",
33 "liblogwrap",
34 "libselinux",
35 "libutils",
36 ],
37
Risand57852c2018-11-02 04:51:14 +090038 product_variables: {
39 arc: {
40 exclude_srcs: [
41 "QuotaUtils.cpp",
42 ],
43 static_libs: [
44 "libarcdiskquota",
45 "arc_services_aidl",
46 ],
47 cflags: [
48 "-DUSE_ARC",
49 ],
50 },
51 },
52
Dan Willemsen4c939742016-12-06 15:44:57 -080053 clang: true,
Jeff Sharkeyc1149c92017-09-21 14:51:09 -060054
55 tidy: true,
56 tidy_checks: [
57 "-*",
58 "clang-analyzer-security*",
59 "cert-*",
60 "-cert-err58-cpp",
61 ],
62 tidy_flags: [
63 "-warnings-as-errors=clang-analyzer-security*,cert-*"
64 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080065}
66
67//
68// Static library used in testing and executable
69//
70
71cc_library_static {
72 name: "libinstalld",
73 defaults: ["installd_defaults"],
74
75 export_include_dirs: ["."],
76 aidl: {
77 export_aidl_headers: true,
78 },
Risand57852c2018-11-02 04:51:14 +090079
80 product_variables: {
81 arc: {
82 exclude_srcs: [
83 "QuotaUtils.cpp",
84 ],
85 static_libs: [
86 "libarcdiskquota",
87 "arc_services_aidl",
88 ],
89 cflags: [
90 "-DUSE_ARC",
91 ],
92 },
93 },
94}
95
96cc_library_headers {
97 name: "libinstalld_headers",
98 export_include_dirs: ["."],
Dan Willemsen4c939742016-12-06 15:44:57 -080099}
100
101//
102// Executable
103//
104
105cc_binary {
106 name: "installd",
107 defaults: ["installd_defaults"],
108 srcs: ["installd.cpp"],
109
110 static_libs: ["libdiskusage"],
111
112 init_rc: ["installd.rc"],
Risand57852c2018-11-02 04:51:14 +0900113
114 product_variables: {
115 arc: {
116 exclude_srcs: [
117 "QuotaUtils.cpp",
118 ],
119 static_libs: [
120 "libarcdiskquota",
121 "arc_services_aidl",
122 ],
123 cflags: [
124 "-DUSE_ARC",
125 ],
126 },
127 },
Dan Willemsen4c939742016-12-06 15:44:57 -0800128}
129
Dan Willemsen2a001e82016-08-05 14:06:41 -0700130// OTA chroot tool
131
132cc_binary {
133 name: "otapreopt_chroot",
134 cflags: [
135 "-Wall",
136 "-Werror",
137 ],
138 clang: true,
139
Roland Levillain94b41802019-01-18 11:56:50 +0000140 srcs: [
141 "otapreopt_chroot.cpp",
142 "otapreopt_utils.cpp",
143 ],
Dan Willemsen2a001e82016-08-05 14:06:41 -0700144 shared_libs: [
145 "libbase",
146 "liblog",
Roland Levillainc19c6042018-12-18 12:15:12 +0000147 "libprotobuf-cpp-full",
148 "libselinux",
149 "libziparchive",
150 ],
151 static_libs: [
152 "libapex",
153 "libapexd",
154 "lib_apex_manifest_proto",
155 "libavb",
156 "libdm",
Dan Willemsen2a001e82016-08-05 14:06:41 -0700157 ],
158}
Dan Willemsen4c939742016-12-06 15:44:57 -0800159
Colin Crossdd2dae92017-11-14 13:05:37 -0800160filegroup {
161 name: "installd_aidl",
162 srcs: [
163 "binder/android/os/IInstalld.aidl",
164 ],
165}
166
Calin Juravledff47292018-02-01 14:44:56 +0000167//
168// Static library for otapreopt used in testing
169//
170cc_library_static {
171 name: "libotapreoptparameters",
172 cflags: [
173 "-Wall",
174 "-Werror"
175 ],
Calin Juravledff47292018-02-01 14:44:56 +0000176
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700177 srcs: ["otapreopt_parameters.cpp"],
Calin Juravledff47292018-02-01 14:44:56 +0000178
179 export_include_dirs: ["."],
180
181 shared_libs: [
182 "libbase",
183 "libcutils",
184 "liblog",
185 "libutils",
186 ],
187}
188
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700189//
190// OTA Executable
191//
192
193cc_binary {
194 name: "otapreopt",
195 cflags: [
196 "-Wall",
197 "-Werror"
198 ],
199
200 srcs: [
201 "dexopt.cpp",
202 "globals.cpp",
203 "otapreopt.cpp",
Roland Levillain94b41802019-01-18 11:56:50 +0000204 "otapreopt_utils.cpp",
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700205 "utils.cpp",
Eric Holk2af5e6a2019-01-09 18:17:27 -0800206 "view_compiler.cpp",
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700207 ],
208
209 header_libs: ["dex2oat_headers"],
210
211 static_libs: [
212 "libartimagevalues",
213 "libdiskusage",
214 "libotapreoptparameters",
215 ],
216
217 shared_libs: [
218 "libbase",
219 "libcrypto",
220 "libcutils",
221 "liblog",
222 "liblogwrap",
223 "libselinux",
224 "libutils",
225 ],
226}