blob: a6f77aa0860013bfd0c9417b9e43d83884f1db8e [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",
Suren Baghdasaryancd829052018-11-02 19:15:37 -070034 "libprocessgroup",
Dan Willemsen4c939742016-12-06 15:44:57 -080035 "libselinux",
36 "libutils",
37 ],
38
Risand57852c2018-11-02 04:51:14 +090039 product_variables: {
40 arc: {
41 exclude_srcs: [
42 "QuotaUtils.cpp",
43 ],
44 static_libs: [
45 "libarcdiskquota",
46 "arc_services_aidl",
47 ],
48 cflags: [
49 "-DUSE_ARC",
50 ],
51 },
52 },
53
Dan Willemsen4c939742016-12-06 15:44:57 -080054 clang: true,
Jeff Sharkeyc1149c92017-09-21 14:51:09 -060055
56 tidy: true,
57 tidy_checks: [
58 "-*",
59 "clang-analyzer-security*",
60 "cert-*",
61 "-cert-err58-cpp",
62 ],
63 tidy_flags: [
64 "-warnings-as-errors=clang-analyzer-security*,cert-*"
65 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080066}
67
68//
69// Static library used in testing and executable
70//
71
72cc_library_static {
73 name: "libinstalld",
74 defaults: ["installd_defaults"],
75
76 export_include_dirs: ["."],
77 aidl: {
78 export_aidl_headers: true,
79 },
Risand57852c2018-11-02 04:51:14 +090080
81 product_variables: {
82 arc: {
83 exclude_srcs: [
84 "QuotaUtils.cpp",
85 ],
86 static_libs: [
87 "libarcdiskquota",
88 "arc_services_aidl",
89 ],
90 cflags: [
91 "-DUSE_ARC",
92 ],
93 },
94 },
95}
96
97cc_library_headers {
98 name: "libinstalld_headers",
99 export_include_dirs: ["."],
Dan Willemsen4c939742016-12-06 15:44:57 -0800100}
101
102//
103// Executable
104//
105
106cc_binary {
107 name: "installd",
108 defaults: ["installd_defaults"],
109 srcs: ["installd.cpp"],
110
111 static_libs: ["libdiskusage"],
112
113 init_rc: ["installd.rc"],
Risand57852c2018-11-02 04:51:14 +0900114
115 product_variables: {
116 arc: {
117 exclude_srcs: [
118 "QuotaUtils.cpp",
119 ],
120 static_libs: [
121 "libarcdiskquota",
122 "arc_services_aidl",
123 ],
124 cflags: [
125 "-DUSE_ARC",
126 ],
127 },
128 },
Dan Willemsen4c939742016-12-06 15:44:57 -0800129}
130
Dan Willemsen2a001e82016-08-05 14:06:41 -0700131// OTA chroot tool
132
133cc_binary {
134 name: "otapreopt_chroot",
135 cflags: [
136 "-Wall",
137 "-Werror",
138 ],
139 clang: true,
140
141 srcs: ["otapreopt_chroot.cpp"],
142 shared_libs: [
143 "libbase",
144 "liblog",
145 ],
146}
Dan Willemsen4c939742016-12-06 15:44:57 -0800147
Colin Crossdd2dae92017-11-14 13:05:37 -0800148filegroup {
149 name: "installd_aidl",
150 srcs: [
151 "binder/android/os/IInstalld.aidl",
152 ],
153}
154
Calin Juravledff47292018-02-01 14:44:56 +0000155//
156// Static library for otapreopt used in testing
157//
158cc_library_static {
159 name: "libotapreoptparameters",
160 cflags: [
161 "-Wall",
162 "-Werror"
163 ],
Calin Juravledff47292018-02-01 14:44:56 +0000164
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700165 srcs: ["otapreopt_parameters.cpp"],
Calin Juravledff47292018-02-01 14:44:56 +0000166
167 export_include_dirs: ["."],
168
169 shared_libs: [
170 "libbase",
171 "libcutils",
172 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700173 "libprocessgroup",
Calin Juravledff47292018-02-01 14:44:56 +0000174 "libutils",
175 ],
176}
177
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700178//
179// OTA Executable
180//
181
182cc_binary {
183 name: "otapreopt",
184 cflags: [
185 "-Wall",
186 "-Werror"
187 ],
188
189 srcs: [
190 "dexopt.cpp",
191 "globals.cpp",
192 "otapreopt.cpp",
193 "utils.cpp",
Eric Holk0ebbe0f2019-01-09 18:17:27 -0800194 "view_compiler.cpp",
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700195 ],
196
197 header_libs: ["dex2oat_headers"],
198
199 static_libs: [
200 "libartimagevalues",
201 "libdiskusage",
202 "libotapreoptparameters",
203 ],
204
205 shared_libs: [
206 "libbase",
207 "libcrypto",
208 "libcutils",
209 "liblog",
210 "liblogwrap",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700211 "libprocessgroup",
Andreas Gampece9fe7f2018-09-18 10:25:58 -0700212 "libselinux",
213 "libutils",
214 ],
215}