blob: dc31cb259753f896c1a3aa3c405af580cb9a864f [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"],
Jiyong Parka0e75042018-05-24 14:11:00 +0900191 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700192 vendor_ramdisk_available: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -0700193
194 srcs: [
195 "libdebuggerd/backtrace.cpp",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800196 "libdebuggerd/gwp_asan.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700197 "libdebuggerd/open_files_list.cpp",
198 "libdebuggerd/tombstone.cpp",
Josh Gao76e1e302021-01-26 15:53:11 -0800199 "libdebuggerd/tombstone_proto.cpp",
200 "libdebuggerd/tombstone_proto_to_text.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700201 "libdebuggerd/utility.cpp",
202 ],
203
Josh Gaocbe70cb2016-10-18 18:17:52 -0700204 local_include_dirs: ["libdebuggerd/include"],
205 export_include_dirs: ["libdebuggerd/include"],
Josh Gao9c02dc52016-06-15 17:29:00 -0700206
Peter Collingbournef8622522020-04-07 14:07:32 -0700207 include_dirs: [
208 // Needed for private/bionic_fdsan.h
209 "bionic/libc",
Peter Collingbournef8622522020-04-07 14:07:32 -0700210 ],
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800211 header_libs: [
212 "bionic_libc_platform_headers",
213 "gwp_asan_headers",
Jiyong Parkeb769d62022-08-19 13:21:02 +0900214 "liblog_headers",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800215 ],
Josh Gaoce841d92018-08-06 18:26:42 -0700216
Josh Gaoe73c9322017-02-08 16:06:26 -0800217 static_libs: [
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100218 "libdexfile_support", // libunwindstack dependency
Christopher Ferris9a8c8552017-08-11 15:29:19 -0700219 "libunwindstack",
Josh Gaoe73c9322017-02-08 16:06:26 -0800220 "liblzma",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700221 "libbase",
222 "libcutils",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700223 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100224 runtime_libs: [
225 "libdexfile", // libdexfile_support dependency
226 ],
Josh Gaoa48b41b2019-12-13 14:11:04 -0800227
Peter Collingbournef8622522020-04-07 14:07:32 -0700228 whole_static_libs: [
Josh Gao618cea32021-01-26 17:45:43 -0800229 "libasync_safe",
Peter Collingbournef8622522020-04-07 14:07:32 -0700230 "gwp_asan_crash_handler",
Josh Gao76e1e302021-01-26 15:53:11 -0800231 "libtombstone_proto",
Josh Gaodbb83de2021-03-01 23:13:13 -0800232 "libprocinfo",
Josh Gao76e1e302021-01-26 15:53:11 -0800233 "libprotobuf-cpp-lite",
Peter Collingbournef8622522020-04-07 14:07:32 -0700234 ],
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800235
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000236 target: {
237 recovery: {
238 exclude_static_libs: [
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100239 "libdexfile_support",
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000240 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100241 exclude_runtime_libs: [
242 "libdexfile",
243 ],
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000244 },
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700245 vendor_ramdisk: {
246 exclude_static_libs: [
247 "libdexfile_support",
248 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100249 exclude_runtime_libs: [
250 "libdexfile",
251 ],
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700252 },
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000253 },
Christopher Ferris4ae266c2019-04-03 09:27:12 -0700254
255 product_variables: {
256 debuggable: {
257 cflags: ["-DROOT_POSSIBLE"],
258 },
Christopher Ferris7aad2562021-09-24 00:06:38 -0700259
260 malloc_not_svelte: {
261 cflags: ["-DUSE_SCUDO"],
262 whole_static_libs: ["libscudo"],
263 srcs: ["libdebuggerd/scudo.cpp"],
264 header_libs: ["scudo_headers"],
265 },
Christopher Ferris4ae266c2019-04-03 09:27:12 -0700266 },
Josh Gaocbe70cb2016-10-18 18:17:52 -0700267}
268
Josh Gao76e1e302021-01-26 15:53:11 -0800269cc_binary {
270 name: "pbtombstone",
271 defaults: ["debuggerd_defaults"],
272 srcs: ["pbtombstone.cpp"],
273 static_libs: [
274 "libbase",
275 "libdebuggerd",
276 "liblog",
277 "libprotobuf-cpp-lite",
278 "libtombstone_proto",
279 "libunwindstack",
280 ],
281}
282
Christopher Ferrisfe751c52021-04-16 09:40:40 -0700283cc_test_library {
284 name: "libcrash_test",
285 defaults: ["debuggerd_defaults"],
286 srcs: ["crash_test.cpp"],
287}
288
Josh Gaocbe70cb2016-10-18 18:17:52 -0700289cc_test {
290 name: "debuggerd_test",
291 defaults: ["debuggerd_defaults"],
Josh Gao6cad1392019-08-27 16:02:38 -0700292 require_root: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -0700293
294 cflags: ["-Wno-missing-field-initializers"],
295 srcs: [
296 "libdebuggerd/test/dump_memory_test.cpp",
297 "libdebuggerd/test/elf_fake.cpp",
298 "libdebuggerd/test/log_fake.cpp",
299 "libdebuggerd/test/open_files_list_test.cpp",
Peter Collingbourne47d784e2021-11-05 18:40:52 -0700300 "libdebuggerd/test/utility_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700301 ],
302
303 target: {
304 android: {
305 srcs: [
Josh Gaoae9d7672017-03-24 16:26:03 -0700306 "client/debuggerd_client_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700307 "debuggerd_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700308 ],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800309 static_libs: [
310 "libasync_safe",
311 "libtombstoned_client_static",
312 ],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700313 },
314 },
315
316 shared_libs: [
Josh Gaocbe70cb2016-10-18 18:17:52 -0700317 "libbase",
318 "libcutils",
Josh Gaoae9d7672017-03-24 16:26:03 -0700319 "libdebuggerd_client",
Narayan Kamatha73df602017-05-24 15:07:25 +0100320 "liblog",
Elliott Hughesdc699a22018-02-16 17:58:14 -0800321 "libnativehelper",
Martin Stjernholm852b64e2019-02-20 17:01:24 +0000322 "libunwindstack",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700323 ],
324
325 static_libs: [
Josh Gao352a8452017-03-30 16:46:21 -0700326 "libdebuggerd",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800327 "libgmock",
Peter Collingbourned00a5772020-07-20 23:11:16 -0700328 "libminijail",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700329 ],
330
Josh Gaoa48b41b2019-12-13 14:11:04 -0800331 header_libs: [
332 "bionic_libc_platform_headers",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800333 "gwp_asan_headers",
Josh Gaoa48b41b2019-12-13 14:11:04 -0800334 ],
335
Josh Gaocbe70cb2016-10-18 18:17:52 -0700336 local_include_dirs: [
337 "libdebuggerd",
338 ],
339
340 compile_multilib: "both",
341 multilib: {
342 lib32: {
343 stem: "debuggerd_test32",
344 },
345 lib64: {
346 stem: "debuggerd_test64",
347 },
348 },
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700349
Christopher Ferrisfe751c52021-04-16 09:40:40 -0700350 data: [
351 ":libcrash_test",
352 ],
353
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700354 test_suites: ["device-tests"],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700355}
356
Josh Gaoa42314e2017-12-19 15:08:19 -0800357cc_benchmark {
358 name: "debuggerd_benchmark",
359 defaults: ["debuggerd_defaults"],
360 srcs: ["debuggerd_benchmark.cpp"],
361 shared_libs: [
362 "libbase",
363 "libdebuggerd_client",
364 ],
365}
366
Josh Gaocbe70cb2016-10-18 18:17:52 -0700367cc_binary {
368 name: "crash_dump",
369 srcs: [
370 "crash_dump.cpp",
Shikha Panwarabde59e2023-02-03 15:05:18 +0000371 "tombstone_handler.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700372 "util.cpp",
373 ],
374 defaults: ["debuggerd_defaults"],
375
376 compile_multilib: "both",
377 multilib: {
378 lib32: {
379 suffix: "32",
380 },
381 lib64: {
382 suffix: "64",
383 },
384 },
385
Josh Gaoa48b41b2019-12-13 14:11:04 -0800386 header_libs: [
387 "bionic_libc_platform_headers",
388 ],
389
Josh Gaoe73c9322017-02-08 16:06:26 -0800390 static_libs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +0100391 "libtombstoned_client_static",
Josh Gaoe73c9322017-02-08 16:06:26 -0800392 "libdebuggerd",
393 "libcutils",
Josh Gao76e1e302021-01-26 15:53:11 -0800394
395 "libtombstone_proto",
396 "libprotobuf-cpp-lite",
Josh Gaoe73c9322017-02-08 16:06:26 -0800397 ],
398
Josh Gaocbe70cb2016-10-18 18:17:52 -0700399 shared_libs: [
Josh Gaocbe70cb2016-10-18 18:17:52 -0700400 "libbase",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700401 "liblog",
402 "libprocinfo",
Josh Gao2b2ae0c2017-08-21 14:31:17 -0700403 "libunwindstack",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700404 ],
Peter Collingbourneb72e7482020-03-16 18:14:13 -0700405
406 apex_available: [
407 "com.android.runtime",
408 ],
Peter Collingbournea2739da2022-02-02 17:00:42 -0800409
410 // Required for tests.
411 required: ["crash_dump.policy"],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700412}
413
414cc_binary {
415 name: "debuggerd",
416 srcs: [
417 "debuggerd.cpp",
418 ],
419 defaults: ["debuggerd_defaults"],
420
421 shared_libs: [
422 "libbase",
423 "libdebuggerd_client",
424 "liblog",
Josh Gao0915f232017-06-27 14:08:05 -0700425 "libprocinfo",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700426 ],
427
428 local_include_dirs: ["include"],
429}
430
Nikita Ioffe75be7842022-10-24 15:31:11 +0100431cc_defaults {
432 name: "tombstoned_defaults",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700433 srcs: [
434 "util.cpp",
435 "tombstoned/intercept_manager.cpp",
436 "tombstoned/tombstoned.cpp",
437 ],
438 defaults: ["debuggerd_defaults"],
439
Josh Gaoa48b41b2019-12-13 14:11:04 -0800440 header_libs: [
441 "bionic_libc_platform_headers",
442 "libdebuggerd_common_headers"
443 ],
Narayan Kamatha73df602017-05-24 15:07:25 +0100444
Josh Gaocbe70cb2016-10-18 18:17:52 -0700445 static_libs: [
446 "libbase",
447 "libcutils",
448 "libevent",
449 "liblog",
450 ],
Nikita Ioffe75be7842022-10-24 15:31:11 +0100451}
Josh Gaocbe70cb2016-10-18 18:17:52 -0700452
Nikita Ioffe75be7842022-10-24 15:31:11 +0100453cc_binary {
454 name: "tombstoned",
455 defaults: ["tombstoned_defaults"],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800456 init_rc: ["tombstoned/tombstoned.rc"],
Josh Gao9c02dc52016-06-15 17:29:00 -0700457}
Ray Essickbd3ba782020-01-21 15:21:08 -0800458
Nikita Ioffe75be7842022-10-24 15:31:11 +0100459cc_binary {
460 name: "tombstoned.microdroid",
461 defaults: ["tombstoned_defaults"],
462 init_rc: ["tombstoned/tombstoned.microdroid.rc"],
463}
464
Ray Essickbd3ba782020-01-21 15:21:08 -0800465prebuilt_etc {
466 name: "crash_dump.policy",
467 sub_dir: "seccomp_policy",
468 filename_from_src: true,
469 arch: {
470 arm: {
471 src: "seccomp_policy/crash_dump.arm.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000472 required: [
473 "crash_dump.policy_other",
474 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800475 },
476 arm64: {
477 src: "seccomp_policy/crash_dump.arm64.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000478 required: [
479 "crash_dump.policy_other",
480 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800481 },
Chen Guoyina22af662022-10-12 22:32:55 +0800482 riscv64: {
483 src: "seccomp_policy/crash_dump.riscv64.policy",
484 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800485 x86: {
486 src: "seccomp_policy/crash_dump.x86.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000487 required: [
488 "crash_dump.policy_other",
489 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800490 },
491 x86_64: {
492 src: "seccomp_policy/crash_dump.x86_64.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000493 required: [
494 "crash_dump.policy_other",
495 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800496 },
497 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800498}
499
500
Elliott Hughes2f883312022-11-14 20:02:28 +0000501// This installs the "other" architecture (so 32-bit on 64-bit device).
Ray Essickbd3ba782020-01-21 15:21:08 -0800502prebuilt_etc {
503 name: "crash_dump.policy_other",
504 sub_dir: "seccomp_policy",
505 filename_from_src: true,
506 arch: {
507 arm: {
508 src: "seccomp_policy/crash_dump.arm64.policy",
509 },
510 arm64: {
511 src: "seccomp_policy/crash_dump.arm.policy",
512 },
513 x86: {
514 src: "seccomp_policy/crash_dump.x86_64.policy",
515 },
516 x86_64: {
517 src: "seccomp_policy/crash_dump.x86.policy",
518 },
519 },
520}