blob: 95f5efb414410ce8d8ab5c3ab07f8376d65a2d80 [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",
Colin Crossdd2dae92017-11-14 13:05:37 -080021 ":installd_aidl",
Dan Willemsen4c939742016-12-06 15:44:57 -080022 ],
Andreas Gampefa2dadd2018-02-28 19:52:47 -080023 header_libs: [
24 "dex2oat_headers",
25 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080026 shared_libs: [
27 "libbase",
28 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010029 "libcrypto",
Dan Willemsen4c939742016-12-06 15:44:57 -080030 "libcutils",
31 "liblog",
32 "liblogwrap",
33 "libselinux",
34 "libutils",
35 ],
36
Risand57852c2018-11-02 04:51:14 +090037 product_variables: {
38 arc: {
39 exclude_srcs: [
40 "QuotaUtils.cpp",
41 ],
42 static_libs: [
43 "libarcdiskquota",
44 "arc_services_aidl",
45 ],
46 cflags: [
47 "-DUSE_ARC",
48 ],
49 },
50 },
51
Dan Willemsen4c939742016-12-06 15:44:57 -080052 clang: true,
Jeff Sharkeyc1149c92017-09-21 14:51:09 -060053
54 tidy: true,
55 tidy_checks: [
56 "-*",
57 "clang-analyzer-security*",
58 "cert-*",
59 "-cert-err58-cpp",
60 ],
61 tidy_flags: [
62 "-warnings-as-errors=clang-analyzer-security*,cert-*"
63 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080064}
65
66//
67// Static library used in testing and executable
68//
69
70cc_library_static {
71 name: "libinstalld",
72 defaults: ["installd_defaults"],
73
74 export_include_dirs: ["."],
75 aidl: {
76 export_aidl_headers: true,
77 },
Risand57852c2018-11-02 04:51:14 +090078
79 product_variables: {
80 arc: {
81 exclude_srcs: [
82 "QuotaUtils.cpp",
83 ],
84 static_libs: [
85 "libarcdiskquota",
86 "arc_services_aidl",
87 ],
88 cflags: [
89 "-DUSE_ARC",
90 ],
91 },
92 },
93}
94
95cc_library_headers {
96 name: "libinstalld_headers",
97 export_include_dirs: ["."],
Dan Willemsen4c939742016-12-06 15:44:57 -080098}
99
100//
101// Executable
102//
103
104cc_binary {
105 name: "installd",
106 defaults: ["installd_defaults"],
107 srcs: ["installd.cpp"],
108
109 static_libs: ["libdiskusage"],
110
111 init_rc: ["installd.rc"],
Risand57852c2018-11-02 04:51:14 +0900112
113 product_variables: {
114 arc: {
115 exclude_srcs: [
116 "QuotaUtils.cpp",
117 ],
118 static_libs: [
119 "libarcdiskquota",
120 "arc_services_aidl",
121 ],
122 cflags: [
123 "-DUSE_ARC",
124 ],
125 },
126 },
Dan Willemsen4c939742016-12-06 15:44:57 -0800127}
128
Dan Willemsen2a001e82016-08-05 14:06:41 -0700129// OTA chroot tool
130
131cc_binary {
132 name: "otapreopt_chroot",
133 cflags: [
134 "-Wall",
135 "-Werror",
136 ],
137 clang: true,
138
Roland Levillain94b41802019-01-18 11:56:50 +0000139 srcs: [
140 "otapreopt_chroot.cpp",
141 "otapreopt_utils.cpp",
142 ],
Dan Willemsen2a001e82016-08-05 14:06:41 -0700143 shared_libs: [
144 "libbase",
145 "liblog",
Roland Levillainc19c6042018-12-18 12:15:12 +0000146 "libprotobuf-cpp-full",
147 "libselinux",
148 "libziparchive",
149 ],
150 static_libs: [
151 "libapex",
152 "libapexd",
153 "lib_apex_manifest_proto",
154 "libavb",
155 "libdm",
Dan Willemsen2a001e82016-08-05 14:06:41 -0700156 ],
157}
Dan Willemsen4c939742016-12-06 15:44:57 -0800158
Colin Crossdd2dae92017-11-14 13:05:37 -0800159filegroup {
160 name: "installd_aidl",
161 srcs: [
162 "binder/android/os/IInstalld.aidl",
163 ],
164}
165
Calin Juravledff47292018-02-01 14:44:56 +0000166//
167// Static library for otapreopt used in testing
168//
169cc_library_static {
170 name: "libotapreoptparameters",
171 cflags: [
172 "-Wall",
173 "-Werror"
174 ],
Calin Juravledff47292018-02-01 14:44:56 +0000175
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700176 srcs: ["otapreopt_parameters.cpp"],
Calin Juravledff47292018-02-01 14:44:56 +0000177
178 export_include_dirs: ["."],
179
180 shared_libs: [
181 "libbase",
182 "libcutils",
183 "liblog",
184 "libutils",
185 ],
186}
187
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700188//
189// OTA Executable
190//
191
192cc_binary {
193 name: "otapreopt",
194 cflags: [
195 "-Wall",
196 "-Werror"
197 ],
198
199 srcs: [
200 "dexopt.cpp",
201 "globals.cpp",
202 "otapreopt.cpp",
Roland Levillain94b41802019-01-18 11:56:50 +0000203 "otapreopt_utils.cpp",
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700204 "utils.cpp",
205 ],
206
207 header_libs: ["dex2oat_headers"],
208
209 static_libs: [
210 "libartimagevalues",
211 "libdiskusage",
212 "libotapreoptparameters",
213 ],
214
215 shared_libs: [
216 "libbase",
217 "libcrypto",
218 "libcutils",
219 "liblog",
220 "liblogwrap",
221 "libselinux",
222 "libutils",
223 ],
224}