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