blob: 2e9701f8b0f2fdf5776b96102f57c20ee8614ed0 [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
139 srcs: ["otapreopt_chroot.cpp"],
140 shared_libs: [
141 "libbase",
142 "liblog",
143 ],
144}
Dan Willemsen4c939742016-12-06 15:44:57 -0800145
Colin Crossdd2dae92017-11-14 13:05:37 -0800146filegroup {
147 name: "installd_aidl",
148 srcs: [
149 "binder/android/os/IInstalld.aidl",
150 ],
151}
152
Calin Juravledff47292018-02-01 14:44:56 +0000153//
154// Static library for otapreopt used in testing
155//
156cc_library_static {
157 name: "libotapreoptparameters",
158 cflags: [
159 "-Wall",
160 "-Werror"
161 ],
Calin Juravledff47292018-02-01 14:44:56 +0000162
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700163 srcs: ["otapreopt_parameters.cpp"],
Calin Juravledff47292018-02-01 14:44:56 +0000164
165 export_include_dirs: ["."],
166
167 shared_libs: [
168 "libbase",
169 "libcutils",
170 "liblog",
171 "libutils",
172 ],
173}
174
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700175//
176// OTA Executable
177//
178
179cc_binary {
180 name: "otapreopt",
181 cflags: [
182 "-Wall",
183 "-Werror"
184 ],
185
186 srcs: [
187 "dexopt.cpp",
188 "globals.cpp",
189 "otapreopt.cpp",
190 "utils.cpp",
191 ],
192
193 header_libs: ["dex2oat_headers"],
194
195 static_libs: [
196 "libartimagevalues",
197 "libdiskusage",
198 "libotapreoptparameters",
199 ],
200
201 shared_libs: [
202 "libbase",
203 "libcrypto",
204 "libcutils",
205 "liblog",
206 "liblogwrap",
207 "libselinux",
208 "libutils",
209 ],
210}