blob: 5393e25e50987bfdd0e70ceb46bb58cdd64dc42e [file] [log] [blame]
Bob Badourd69ad692021-02-16 19:02:14 -08001package {
Elliott Hughes813fd6d2021-06-25 14:42:51 -07002 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badourd69ad692021-02-16 19:02:14 -08003}
4
Josh Gaocbe70cb2016-10-18 18:17:52 -07005cc_defaults {
6 name: "debuggerd_defaults",
7 cflags: [
8 "-Wall",
9 "-Wextra",
Josh Gaoc7fe0602017-03-13 14:13:29 -070010 "-Werror",
Kalesh Singha9ea7e52021-06-17 15:49:50 -040011 "-Wno-gcc-compat",
Josh Gao2b2ae0c2017-08-21 14:31:17 -070012 "-Wno-unused-argument",
13 "-Wno-unused-function",
Josh Gaocbe70cb2016-10-18 18:17:52 -070014 "-Wno-nullability-completeness",
15 "-Os",
Yabin Cuie90a9442021-08-11 13:21:11 -070016 "-fno-finite-loops",
Alessandra Loro7bd6dca2022-09-01 10:33:35 +000017 "-DANDROID_DEBUGGABLE=0",
Josh Gaocbe70cb2016-10-18 18:17:52 -070018 ],
19
20 local_include_dirs: ["include"],
Alessandra Loro7bd6dca2022-09-01 10:33:35 +000021 product_variables: {
22 debuggable: {
23 cflags: ["-UANDROID_DEBUGGABLE", "-DANDROID_DEBUGGABLE=1"],
24 }
25 },
Josh Gaocbe70cb2016-10-18 18:17:52 -070026}
27
Narayan Kamatha73df602017-05-24 15:07:25 +010028cc_library_headers {
29 name: "libdebuggerd_common_headers",
Elliott Hughesdc699a22018-02-16 17:58:14 -080030 export_include_dirs: ["common/include"],
Jiyong Parka0e75042018-05-24 14:11:00 +090031 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -070032 vendor_ramdisk_available: true,
Shikha Panwar757f2992022-03-25 19:43:14 +000033 apex_available: [
34 "com.android.virt",
35 "//apex_available:platform",
36 ],
Narayan Kamatha73df602017-05-24 15:07:25 +010037}
38
Narayan Kamath2d377cd2017-05-10 10:58:59 +010039cc_library_shared {
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080040 name: "libtombstoned_client",
41 defaults: ["debuggerd_defaults"],
42 srcs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +010043 "tombstoned/tombstoned_client.cpp",
44 "util.cpp",
45 ],
46
Narayan Kamatha73df602017-05-24 15:07:25 +010047 header_libs: ["libdebuggerd_common_headers"],
48
Narayan Kamath2d377cd2017-05-10 10:58:59 +010049 static_libs: [
Narayan Kamatha73df602017-05-24 15:07:25 +010050 "libasync_safe",
Narayan Kamath2d377cd2017-05-10 10:58:59 +010051 ],
52
53 shared_libs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +010054 "libbase",
Narayan Kamatha73df602017-05-24 15:07:25 +010055 "libcutils",
Narayan Kamath2d377cd2017-05-10 10:58:59 +010056 ],
Shikha Panwar757f2992022-03-25 19:43:14 +000057 apex_available: [
58 "com.android.virt",
59 "//apex_available:platform",
60 ],
Narayan Kamath2d377cd2017-05-10 10:58:59 +010061
Narayan Kamatha73df602017-05-24 15:07:25 +010062 export_header_lib_headers: ["libdebuggerd_common_headers"],
Elliott Hughesdc699a22018-02-16 17:58:14 -080063 export_include_dirs: ["tombstoned/include"],
Narayan Kamath2d377cd2017-05-10 10:58:59 +010064}
65
Josh Gao9da1f512018-08-06 15:38:29 -070066// Utility library to talk to tombstoned and get an output fd.
Narayan Kamath2d377cd2017-05-10 10:58:59 +010067cc_library_static {
68 name: "libtombstoned_client_static",
69 defaults: ["debuggerd_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090070 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -070071 vendor_ramdisk_available: true,
Narayan Kamath2d377cd2017-05-10 10:58:59 +010072 srcs: [
73 "tombstoned/tombstoned_client.cpp",
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080074 "util.cpp",
75 ],
76
Narayan Kamatha73df602017-05-24 15:07:25 +010077 header_libs: ["libdebuggerd_common_headers"],
78
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080079 whole_static_libs: [
Christopher Ferrisac225782017-04-25 11:23:10 -070080 "libasync_safe",
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080081 "libcutils",
82 "libbase",
83 ],
Narayan Kamath2d377cd2017-05-10 10:58:59 +010084
Narayan Kamatha73df602017-05-24 15:07:25 +010085 export_header_lib_headers: ["libdebuggerd_common_headers"],
Elliott Hughesdc699a22018-02-16 17:58:14 -080086 export_include_dirs: ["tombstoned/include"],
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080087}
88
89// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
Josh Gao9c02dc52016-06-15 17:29:00 -070090cc_library_static {
Josh Gaoe73c9322017-02-08 16:06:26 -080091 name: "libdebuggerd_handler_core",
Josh Gaocbe70cb2016-10-18 18:17:52 -070092 defaults: ["debuggerd_defaults"],
Jiyong Parka0e75042018-05-24 14:11:00 +090093 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -070094 vendor_ramdisk_available: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -070095 srcs: ["handler/debuggerd_handler.cpp"],
Josh Gao9c02dc52016-06-15 17:29:00 -070096
Josh Gaofdf832d2017-08-25 18:00:18 -070097 header_libs: [
98 "libbase_headers",
99 "libdebuggerd_common_headers",
Josh Gaoa48b41b2019-12-13 14:11:04 -0800100 "bionic_libc_platform_headers",
Mitch Phillips18ce5422023-01-19 14:23:49 -0800101 "gwp_asan_headers",
Josh Gaofdf832d2017-08-25 18:00:18 -0700102 ],
Narayan Kamatha73df602017-05-24 15:07:25 +0100103
Josh Gaoe73c9322017-02-08 16:06:26 -0800104 whole_static_libs: [
Christopher Ferrisac225782017-04-25 11:23:10 -0700105 "libasync_safe",
Josh Gao2b2ae0c2017-08-21 14:31:17 -0700106 "libcutils",
Josh Gaoe73c9322017-02-08 16:06:26 -0800107 "libdebuggerd",
108 ],
109
Narayan Kamatha73df602017-05-24 15:07:25 +0100110 export_header_lib_headers: ["libdebuggerd_common_headers"],
Josh Gaoe73c9322017-02-08 16:06:26 -0800111 export_include_dirs: ["include"],
112}
113
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800114// Implementation with a no-op fallback.
Josh Gaoe73c9322017-02-08 16:06:26 -0800115cc_library_static {
116 name: "libdebuggerd_handler",
117 defaults: ["debuggerd_defaults"],
118 srcs: ["handler/debuggerd_fallback_nop.cpp"],
119
Josh Gaoa48b41b2019-12-13 14:11:04 -0800120 header_libs: ["bionic_libc_platform_headers"],
121 export_header_lib_headers: ["bionic_libc_platform_headers"],
122
Josh Gaoe73c9322017-02-08 16:06:26 -0800123 whole_static_libs: [
124 "libdebuggerd_handler_core",
125 ],
126
127 export_include_dirs: ["include"],
128}
129
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100130// Fallback implementation, for use in the Bionic linker only.
Josh Gaoe73c9322017-02-08 16:06:26 -0800131cc_library_static {
132 name: "libdebuggerd_handler_fallback",
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100133 visibility: ["//bionic/linker"],
134 apex_available: [
135 "com.android.runtime",
136 "//apex_available:platform",
137 ],
Josh Gaoe73c9322017-02-08 16:06:26 -0800138 defaults: ["debuggerd_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +0900139 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700140 vendor_ramdisk_available: true,
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800141 srcs: [
142 "handler/debuggerd_fallback.cpp",
143 ],
Josh Gaoe73c9322017-02-08 16:06:26 -0800144
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800145 whole_static_libs: [
146 "libdebuggerd_handler_core",
Narayan Kamath2d377cd2017-05-10 10:58:59 +0100147 "libtombstoned_client_static",
Christopher Ferrisac225782017-04-25 11:23:10 -0700148 "libasync_safe",
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800149 "libbase",
Josh Gaoe73c9322017-02-08 16:06:26 -0800150 "libdebuggerd",
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100151 "libunwindstack_no_dex",
Josh Gaoe73c9322017-02-08 16:06:26 -0800152 "liblzma",
153 "libcutils",
154 ],
Josh Gaoa48b41b2019-12-13 14:11:04 -0800155
156 header_libs: ["bionic_libc_platform_headers"],
157 export_header_lib_headers: ["bionic_libc_platform_headers"],
158
Josh Gaocbe70cb2016-10-18 18:17:52 -0700159 export_include_dirs: ["include"],
160}
161
162cc_library {
163 name: "libdebuggerd_client",
164 defaults: ["debuggerd_defaults"],
165 srcs: [
166 "client/debuggerd_client.cpp",
167 "util.cpp",
168 ],
169
170 shared_libs: [
171 "libbase",
172 "libcutils",
Josh Gao4175cee2019-01-04 13:57:09 -0800173 "libprocinfo",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700174 ],
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800175
Josh Gaoa48b41b2019-12-13 14:11:04 -0800176 header_libs: [
177 "libdebuggerd_common_headers",
178 "bionic_libc_platform_headers",
179 ],
180 export_header_lib_headers: [
181 "libdebuggerd_common_headers",
182 "bionic_libc_platform_headers",
183 ],
184
Josh Gaocbe70cb2016-10-18 18:17:52 -0700185 export_include_dirs: ["include"],
186}
187
Josh Gaoe73c9322017-02-08 16:06:26 -0800188cc_library_static {
Josh Gaocbe70cb2016-10-18 18:17:52 -0700189 name: "libdebuggerd",
190 defaults: ["debuggerd_defaults"],
Christopher Ferris48d6e042023-07-31 14:24:01 -0700191 ramdisk_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +0900192 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700193 vendor_ramdisk_available: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -0700194
195 srcs: [
196 "libdebuggerd/backtrace.cpp",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800197 "libdebuggerd/gwp_asan.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700198 "libdebuggerd/open_files_list.cpp",
199 "libdebuggerd/tombstone.cpp",
Josh Gao76e1e302021-01-26 15:53:11 -0800200 "libdebuggerd/tombstone_proto.cpp",
201 "libdebuggerd/tombstone_proto_to_text.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700202 "libdebuggerd/utility.cpp",
203 ],
204
Josh Gaocbe70cb2016-10-18 18:17:52 -0700205 local_include_dirs: ["libdebuggerd/include"],
206 export_include_dirs: ["libdebuggerd/include"],
Josh Gao9c02dc52016-06-15 17:29:00 -0700207
Peter Collingbournef8622522020-04-07 14:07:32 -0700208 include_dirs: [
209 // Needed for private/bionic_fdsan.h
210 "bionic/libc",
Peter Collingbournef8622522020-04-07 14:07:32 -0700211 ],
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800212 header_libs: [
213 "bionic_libc_platform_headers",
214 "gwp_asan_headers",
Jiyong Parkeb769d62022-08-19 13:21:02 +0900215 "liblog_headers",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800216 ],
Josh Gaoce841d92018-08-06 18:26:42 -0700217
Josh Gaoe73c9322017-02-08 16:06:26 -0800218 static_libs: [
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100219 "libdexfile_support", // libunwindstack dependency
Christopher Ferris9a8c8552017-08-11 15:29:19 -0700220 "libunwindstack",
Josh Gaoe73c9322017-02-08 16:06:26 -0800221 "liblzma",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700222 "libbase",
223 "libcutils",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700224 ],
Josh Gaoa48b41b2019-12-13 14:11:04 -0800225
Peter Collingbournef8622522020-04-07 14:07:32 -0700226 whole_static_libs: [
Josh Gao618cea32021-01-26 17:45:43 -0800227 "libasync_safe",
Peter Collingbournef8622522020-04-07 14:07:32 -0700228 "gwp_asan_crash_handler",
Josh Gao76e1e302021-01-26 15:53:11 -0800229 "libtombstone_proto",
Josh Gaodbb83de2021-03-01 23:13:13 -0800230 "libprocinfo",
Josh Gao76e1e302021-01-26 15:53:11 -0800231 "libprotobuf-cpp-lite",
Peter Collingbournef8622522020-04-07 14:07:32 -0700232 ],
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800233
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000234 target: {
235 recovery: {
236 exclude_static_libs: [
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100237 "libdexfile_support",
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000238 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100239 exclude_runtime_libs: [
240 "libdexfile",
241 ],
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000242 },
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700243 vendor_ramdisk: {
244 exclude_static_libs: [
245 "libdexfile_support",
246 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100247 exclude_runtime_libs: [
248 "libdexfile",
249 ],
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700250 },
Christopher Ferris48d6e042023-07-31 14:24:01 -0700251 ramdisk: {
252 exclude_static_libs: [
253 "libdexfile_support",
254 ],
255 exclude_runtime_libs: [
256 "libdexfile",
257 ],
258 },
259 android: {
260 runtime_libs: [
261 "libdexfile", // libdexfile_support dependency
262 ],
263 },
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000264 },
Christopher Ferris4ae266c2019-04-03 09:27:12 -0700265
266 product_variables: {
267 debuggable: {
268 cflags: ["-DROOT_POSSIBLE"],
269 },
Christopher Ferris7aad2562021-09-24 00:06:38 -0700270
271 malloc_not_svelte: {
272 cflags: ["-DUSE_SCUDO"],
273 whole_static_libs: ["libscudo"],
274 srcs: ["libdebuggerd/scudo.cpp"],
275 header_libs: ["scudo_headers"],
276 },
Christopher Ferris4ae266c2019-04-03 09:27:12 -0700277 },
Josh Gaocbe70cb2016-10-18 18:17:52 -0700278}
279
Josh Gao76e1e302021-01-26 15:53:11 -0800280cc_binary {
281 name: "pbtombstone",
282 defaults: ["debuggerd_defaults"],
283 srcs: ["pbtombstone.cpp"],
284 static_libs: [
285 "libbase",
286 "libdebuggerd",
287 "liblog",
288 "libprotobuf-cpp-lite",
289 "libtombstone_proto",
290 "libunwindstack",
291 ],
292}
293
Christopher Ferrisfe751c52021-04-16 09:40:40 -0700294cc_test_library {
295 name: "libcrash_test",
296 defaults: ["debuggerd_defaults"],
297 srcs: ["crash_test.cpp"],
298}
299
Josh Gaocbe70cb2016-10-18 18:17:52 -0700300cc_test {
301 name: "debuggerd_test",
302 defaults: ["debuggerd_defaults"],
Josh Gao6cad1392019-08-27 16:02:38 -0700303 require_root: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -0700304
305 cflags: ["-Wno-missing-field-initializers"],
306 srcs: [
307 "libdebuggerd/test/dump_memory_test.cpp",
308 "libdebuggerd/test/elf_fake.cpp",
309 "libdebuggerd/test/log_fake.cpp",
310 "libdebuggerd/test/open_files_list_test.cpp",
Peter Collingbourne47d784e2021-11-05 18:40:52 -0700311 "libdebuggerd/test/utility_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700312 ],
313
314 target: {
315 android: {
316 srcs: [
Josh Gaoae9d7672017-03-24 16:26:03 -0700317 "client/debuggerd_client_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700318 "debuggerd_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700319 ],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800320 static_libs: [
321 "libasync_safe",
322 "libtombstoned_client_static",
323 ],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700324 },
325 },
326
327 shared_libs: [
Josh Gaocbe70cb2016-10-18 18:17:52 -0700328 "libbase",
329 "libcutils",
Josh Gaoae9d7672017-03-24 16:26:03 -0700330 "libdebuggerd_client",
Narayan Kamatha73df602017-05-24 15:07:25 +0100331 "liblog",
Elliott Hughesdc699a22018-02-16 17:58:14 -0800332 "libnativehelper",
Martin Stjernholm852b64e2019-02-20 17:01:24 +0000333 "libunwindstack",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700334 ],
335
336 static_libs: [
Josh Gao352a8452017-03-30 16:46:21 -0700337 "libdebuggerd",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800338 "libgmock",
Peter Collingbourned00a5772020-07-20 23:11:16 -0700339 "libminijail",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700340 ],
341
Josh Gaoa48b41b2019-12-13 14:11:04 -0800342 header_libs: [
343 "bionic_libc_platform_headers",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800344 "gwp_asan_headers",
Josh Gaoa48b41b2019-12-13 14:11:04 -0800345 ],
346
Josh Gaocbe70cb2016-10-18 18:17:52 -0700347 local_include_dirs: [
348 "libdebuggerd",
349 ],
350
351 compile_multilib: "both",
352 multilib: {
353 lib32: {
354 stem: "debuggerd_test32",
355 },
356 lib64: {
357 stem: "debuggerd_test64",
358 },
359 },
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700360
Christopher Ferrisfe751c52021-04-16 09:40:40 -0700361 data: [
362 ":libcrash_test",
363 ],
364
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700365 test_suites: ["device-tests"],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700366}
367
Josh Gaoa42314e2017-12-19 15:08:19 -0800368cc_benchmark {
369 name: "debuggerd_benchmark",
370 defaults: ["debuggerd_defaults"],
371 srcs: ["debuggerd_benchmark.cpp"],
372 shared_libs: [
373 "libbase",
374 "libdebuggerd_client",
375 ],
376}
377
Josh Gaocbe70cb2016-10-18 18:17:52 -0700378cc_binary {
379 name: "crash_dump",
380 srcs: [
381 "crash_dump.cpp",
Shikha Panwarabde59e2023-02-03 15:05:18 +0000382 "tombstone_handler.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700383 "util.cpp",
384 ],
385 defaults: ["debuggerd_defaults"],
386
387 compile_multilib: "both",
388 multilib: {
389 lib32: {
390 suffix: "32",
391 },
392 lib64: {
393 suffix: "64",
394 },
395 },
396
Josh Gaoa48b41b2019-12-13 14:11:04 -0800397 header_libs: [
398 "bionic_libc_platform_headers",
399 ],
400
Josh Gaoe73c9322017-02-08 16:06:26 -0800401 static_libs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +0100402 "libtombstoned_client_static",
Josh Gaoe73c9322017-02-08 16:06:26 -0800403 "libdebuggerd",
404 "libcutils",
Josh Gao76e1e302021-01-26 15:53:11 -0800405
406 "libtombstone_proto",
407 "libprotobuf-cpp-lite",
Josh Gaoe73c9322017-02-08 16:06:26 -0800408 ],
409
Josh Gaocbe70cb2016-10-18 18:17:52 -0700410 shared_libs: [
Josh Gaocbe70cb2016-10-18 18:17:52 -0700411 "libbase",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700412 "liblog",
413 "libprocinfo",
Josh Gao2b2ae0c2017-08-21 14:31:17 -0700414 "libunwindstack",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700415 ],
Peter Collingbourneb72e7482020-03-16 18:14:13 -0700416
417 apex_available: [
418 "com.android.runtime",
419 ],
Peter Collingbournea2739da2022-02-02 17:00:42 -0800420
421 // Required for tests.
422 required: ["crash_dump.policy"],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700423}
424
425cc_binary {
426 name: "debuggerd",
427 srcs: [
428 "debuggerd.cpp",
429 ],
430 defaults: ["debuggerd_defaults"],
431
432 shared_libs: [
433 "libbase",
434 "libdebuggerd_client",
435 "liblog",
Josh Gao0915f232017-06-27 14:08:05 -0700436 "libprocinfo",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700437 ],
438
439 local_include_dirs: ["include"],
440}
441
Nikita Ioffe75be7842022-10-24 15:31:11 +0100442cc_defaults {
443 name: "tombstoned_defaults",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700444 srcs: [
445 "util.cpp",
446 "tombstoned/intercept_manager.cpp",
447 "tombstoned/tombstoned.cpp",
448 ],
449 defaults: ["debuggerd_defaults"],
450
Josh Gaoa48b41b2019-12-13 14:11:04 -0800451 header_libs: [
452 "bionic_libc_platform_headers",
453 "libdebuggerd_common_headers"
454 ],
Narayan Kamatha73df602017-05-24 15:07:25 +0100455
Josh Gaocbe70cb2016-10-18 18:17:52 -0700456 static_libs: [
457 "libbase",
458 "libcutils",
459 "libevent",
460 "liblog",
461 ],
Nikita Ioffe75be7842022-10-24 15:31:11 +0100462}
Josh Gaocbe70cb2016-10-18 18:17:52 -0700463
Nikita Ioffe75be7842022-10-24 15:31:11 +0100464cc_binary {
465 name: "tombstoned",
466 defaults: ["tombstoned_defaults"],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800467 init_rc: ["tombstoned/tombstoned.rc"],
Josh Gao9c02dc52016-06-15 17:29:00 -0700468}
Ray Essickbd3ba782020-01-21 15:21:08 -0800469
Nikita Ioffe75be7842022-10-24 15:31:11 +0100470cc_binary {
471 name: "tombstoned.microdroid",
472 defaults: ["tombstoned_defaults"],
473 init_rc: ["tombstoned/tombstoned.microdroid.rc"],
474}
475
Ray Essickbd3ba782020-01-21 15:21:08 -0800476prebuilt_etc {
477 name: "crash_dump.policy",
478 sub_dir: "seccomp_policy",
479 filename_from_src: true,
480 arch: {
481 arm: {
482 src: "seccomp_policy/crash_dump.arm.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000483 required: [
484 "crash_dump.policy_other",
485 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800486 },
487 arm64: {
488 src: "seccomp_policy/crash_dump.arm64.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000489 required: [
490 "crash_dump.policy_other",
491 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800492 },
Chen Guoyina22af662022-10-12 22:32:55 +0800493 riscv64: {
494 src: "seccomp_policy/crash_dump.riscv64.policy",
495 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800496 x86: {
497 src: "seccomp_policy/crash_dump.x86.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000498 required: [
499 "crash_dump.policy_other",
500 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800501 },
502 x86_64: {
503 src: "seccomp_policy/crash_dump.x86_64.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000504 required: [
505 "crash_dump.policy_other",
506 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800507 },
508 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800509}
510
511
Elliott Hughes2f883312022-11-14 20:02:28 +0000512// This installs the "other" architecture (so 32-bit on 64-bit device).
Ray Essickbd3ba782020-01-21 15:21:08 -0800513prebuilt_etc {
514 name: "crash_dump.policy_other",
515 sub_dir: "seccomp_policy",
516 filename_from_src: true,
517 arch: {
518 arm: {
519 src: "seccomp_policy/crash_dump.arm64.policy",
520 },
521 arm64: {
522 src: "seccomp_policy/crash_dump.arm.policy",
523 },
Elliott Hughes857e29c2023-03-20 15:48:30 -0700524 riscv64: {
525 enabled: false,
526 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800527 x86: {
528 src: "seccomp_policy/crash_dump.x86_64.policy",
529 },
530 x86_64: {
531 src: "seccomp_policy/crash_dump.x86.policy",
532 },
533 },
534}