blob: 267571b50175aa08d976473e8656239f93c4eb60 [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",
Christopher Ferrisf58b0092023-09-12 13:01:10 -070015 "-Wno-reorder-init-list",
Josh Gaocbe70cb2016-10-18 18:17:52 -070016 "-Os",
Yabin Cuie90a9442021-08-11 13:21:11 -070017 "-fno-finite-loops",
Alessandra Loro7bd6dca2022-09-01 10:33:35 +000018 "-DANDROID_DEBUGGABLE=0",
Josh Gaocbe70cb2016-10-18 18:17:52 -070019 ],
20
21 local_include_dirs: ["include"],
Alessandra Loro7bd6dca2022-09-01 10:33:35 +000022 product_variables: {
23 debuggable: {
24 cflags: ["-UANDROID_DEBUGGABLE", "-DANDROID_DEBUGGABLE=1"],
25 }
26 },
Josh Gaocbe70cb2016-10-18 18:17:52 -070027}
28
Narayan Kamatha73df602017-05-24 15:07:25 +010029cc_library_headers {
30 name: "libdebuggerd_common_headers",
Elliott Hughesdc699a22018-02-16 17:58:14 -080031 export_include_dirs: ["common/include"],
Jiyong Parka0e75042018-05-24 14:11:00 +090032 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -070033 vendor_ramdisk_available: true,
Shikha Panwar757f2992022-03-25 19:43:14 +000034 apex_available: [
35 "com.android.virt",
36 "//apex_available:platform",
37 ],
Narayan Kamatha73df602017-05-24 15:07:25 +010038}
39
Narayan Kamath2d377cd2017-05-10 10:58:59 +010040cc_library_shared {
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080041 name: "libtombstoned_client",
42 defaults: ["debuggerd_defaults"],
43 srcs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +010044 "tombstoned/tombstoned_client.cpp",
45 "util.cpp",
46 ],
47
Narayan Kamatha73df602017-05-24 15:07:25 +010048 header_libs: ["libdebuggerd_common_headers"],
49
Narayan Kamath2d377cd2017-05-10 10:58:59 +010050 static_libs: [
Narayan Kamatha73df602017-05-24 15:07:25 +010051 "libasync_safe",
Narayan Kamath2d377cd2017-05-10 10:58:59 +010052 ],
53
54 shared_libs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +010055 "libbase",
Narayan Kamatha73df602017-05-24 15:07:25 +010056 "libcutils",
Narayan Kamath2d377cd2017-05-10 10:58:59 +010057 ],
Shikha Panwar757f2992022-03-25 19:43:14 +000058 apex_available: [
59 "com.android.virt",
60 "//apex_available:platform",
61 ],
Narayan Kamath2d377cd2017-05-10 10:58:59 +010062
Narayan Kamatha73df602017-05-24 15:07:25 +010063 export_header_lib_headers: ["libdebuggerd_common_headers"],
Elliott Hughesdc699a22018-02-16 17:58:14 -080064 export_include_dirs: ["tombstoned/include"],
Narayan Kamath2d377cd2017-05-10 10:58:59 +010065}
66
Josh Gao9da1f512018-08-06 15:38:29 -070067// Utility library to talk to tombstoned and get an output fd.
Narayan Kamath2d377cd2017-05-10 10:58:59 +010068cc_library_static {
69 name: "libtombstoned_client_static",
70 defaults: ["debuggerd_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +090071 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -070072 vendor_ramdisk_available: true,
Narayan Kamath2d377cd2017-05-10 10:58:59 +010073 srcs: [
74 "tombstoned/tombstoned_client.cpp",
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080075 "util.cpp",
76 ],
77
Narayan Kamatha73df602017-05-24 15:07:25 +010078 header_libs: ["libdebuggerd_common_headers"],
79
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080080 whole_static_libs: [
Christopher Ferrisac225782017-04-25 11:23:10 -070081 "libasync_safe",
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080082 "libcutils",
83 "libbase",
84 ],
Narayan Kamath2d377cd2017-05-10 10:58:59 +010085
Narayan Kamatha73df602017-05-24 15:07:25 +010086 export_header_lib_headers: ["libdebuggerd_common_headers"],
Elliott Hughesdc699a22018-02-16 17:58:14 -080087 export_include_dirs: ["tombstoned/include"],
Josh Gaoe1aa0ca2017-03-01 17:23:22 -080088}
89
90// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
Josh Gao9c02dc52016-06-15 17:29:00 -070091cc_library_static {
Josh Gaoe73c9322017-02-08 16:06:26 -080092 name: "libdebuggerd_handler_core",
Josh Gaocbe70cb2016-10-18 18:17:52 -070093 defaults: ["debuggerd_defaults"],
Jiyong Parka0e75042018-05-24 14:11:00 +090094 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -070095 vendor_ramdisk_available: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -070096 srcs: ["handler/debuggerd_handler.cpp"],
Josh Gao9c02dc52016-06-15 17:29:00 -070097
Josh Gaofdf832d2017-08-25 18:00:18 -070098 header_libs: [
99 "libbase_headers",
100 "libdebuggerd_common_headers",
Josh Gaoa48b41b2019-12-13 14:11:04 -0800101 "bionic_libc_platform_headers",
Mitch Phillips18ce5422023-01-19 14:23:49 -0800102 "gwp_asan_headers",
Josh Gaofdf832d2017-08-25 18:00:18 -0700103 ],
Narayan Kamatha73df602017-05-24 15:07:25 +0100104
Josh Gaoe73c9322017-02-08 16:06:26 -0800105 whole_static_libs: [
Christopher Ferrisac225782017-04-25 11:23:10 -0700106 "libasync_safe",
Josh Gao2b2ae0c2017-08-21 14:31:17 -0700107 "libcutils",
Josh Gaoe73c9322017-02-08 16:06:26 -0800108 "libdebuggerd",
109 ],
110
Narayan Kamatha73df602017-05-24 15:07:25 +0100111 export_header_lib_headers: ["libdebuggerd_common_headers"],
Josh Gaoe73c9322017-02-08 16:06:26 -0800112 export_include_dirs: ["include"],
113}
114
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800115// Implementation with a no-op fallback.
Josh Gaoe73c9322017-02-08 16:06:26 -0800116cc_library_static {
117 name: "libdebuggerd_handler",
118 defaults: ["debuggerd_defaults"],
119 srcs: ["handler/debuggerd_fallback_nop.cpp"],
120
Josh Gaoa48b41b2019-12-13 14:11:04 -0800121 header_libs: ["bionic_libc_platform_headers"],
122 export_header_lib_headers: ["bionic_libc_platform_headers"],
123
Josh Gaoe73c9322017-02-08 16:06:26 -0800124 whole_static_libs: [
125 "libdebuggerd_handler_core",
126 ],
127
128 export_include_dirs: ["include"],
129}
130
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100131// Fallback implementation, for use in the Bionic linker only.
Josh Gaoe73c9322017-02-08 16:06:26 -0800132cc_library_static {
133 name: "libdebuggerd_handler_fallback",
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100134 visibility: ["//bionic/linker"],
135 apex_available: [
136 "com.android.runtime",
137 "//apex_available:platform",
138 ],
Josh Gaoe73c9322017-02-08 16:06:26 -0800139 defaults: ["debuggerd_defaults"],
Jiyong Park011ee122018-05-29 16:41:30 +0900140 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700141 vendor_ramdisk_available: true,
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800142 srcs: [
143 "handler/debuggerd_fallback.cpp",
144 ],
Josh Gaoe73c9322017-02-08 16:06:26 -0800145
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800146 whole_static_libs: [
147 "libdebuggerd_handler_core",
Narayan Kamath2d377cd2017-05-10 10:58:59 +0100148 "libtombstoned_client_static",
Christopher Ferrisac225782017-04-25 11:23:10 -0700149 "libasync_safe",
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800150 "libbase",
Josh Gaoe73c9322017-02-08 16:06:26 -0800151 "libdebuggerd",
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100152 "libunwindstack_no_dex",
Josh Gaoe73c9322017-02-08 16:06:26 -0800153 "liblzma",
154 "libcutils",
155 ],
Josh Gaoa48b41b2019-12-13 14:11:04 -0800156
157 header_libs: ["bionic_libc_platform_headers"],
158 export_header_lib_headers: ["bionic_libc_platform_headers"],
159
Josh Gaocbe70cb2016-10-18 18:17:52 -0700160 export_include_dirs: ["include"],
161}
162
163cc_library {
164 name: "libdebuggerd_client",
165 defaults: ["debuggerd_defaults"],
166 srcs: [
167 "client/debuggerd_client.cpp",
168 "util.cpp",
169 ],
170
171 shared_libs: [
172 "libbase",
173 "libcutils",
Josh Gao4175cee2019-01-04 13:57:09 -0800174 "libprocinfo",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700175 ],
Josh Gaoe1aa0ca2017-03-01 17:23:22 -0800176
Josh Gaoa48b41b2019-12-13 14:11:04 -0800177 header_libs: [
178 "libdebuggerd_common_headers",
179 "bionic_libc_platform_headers",
180 ],
181 export_header_lib_headers: [
182 "libdebuggerd_common_headers",
183 "bionic_libc_platform_headers",
184 ],
185
Josh Gaocbe70cb2016-10-18 18:17:52 -0700186 export_include_dirs: ["include"],
187}
188
Josh Gaoe73c9322017-02-08 16:06:26 -0800189cc_library_static {
Josh Gaocbe70cb2016-10-18 18:17:52 -0700190 name: "libdebuggerd",
191 defaults: ["debuggerd_defaults"],
Christopher Ferris48d6e042023-07-31 14:24:01 -0700192 ramdisk_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +0900193 recovery_available: true,
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700194 vendor_ramdisk_available: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -0700195
196 srcs: [
197 "libdebuggerd/backtrace.cpp",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800198 "libdebuggerd/gwp_asan.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700199 "libdebuggerd/open_files_list.cpp",
200 "libdebuggerd/tombstone.cpp",
Josh Gao76e1e302021-01-26 15:53:11 -0800201 "libdebuggerd/tombstone_proto.cpp",
202 "libdebuggerd/tombstone_proto_to_text.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700203 "libdebuggerd/utility.cpp",
204 ],
205
Josh Gaocbe70cb2016-10-18 18:17:52 -0700206 local_include_dirs: ["libdebuggerd/include"],
207 export_include_dirs: ["libdebuggerd/include"],
Josh Gao9c02dc52016-06-15 17:29:00 -0700208
Peter Collingbournef8622522020-04-07 14:07:32 -0700209 include_dirs: [
210 // Needed for private/bionic_fdsan.h
211 "bionic/libc",
Peter Collingbournef8622522020-04-07 14:07:32 -0700212 ],
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800213 header_libs: [
214 "bionic_libc_platform_headers",
215 "gwp_asan_headers",
Jiyong Parkeb769d62022-08-19 13:21:02 +0900216 "liblog_headers",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800217 ],
Josh Gaoce841d92018-08-06 18:26:42 -0700218
Josh Gaoe73c9322017-02-08 16:06:26 -0800219 static_libs: [
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100220 "libdexfile_support", // libunwindstack dependency
Christopher Ferris9a8c8552017-08-11 15:29:19 -0700221 "libunwindstack",
Josh Gaoe73c9322017-02-08 16:06:26 -0800222 "liblzma",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700223 "libbase",
224 "libcutils",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700225 ],
Josh Gaoa48b41b2019-12-13 14:11:04 -0800226
Peter Collingbournef8622522020-04-07 14:07:32 -0700227 whole_static_libs: [
Josh Gao618cea32021-01-26 17:45:43 -0800228 "libasync_safe",
Peter Collingbournef8622522020-04-07 14:07:32 -0700229 "gwp_asan_crash_handler",
Josh Gao76e1e302021-01-26 15:53:11 -0800230 "libtombstone_proto",
Josh Gaodbb83de2021-03-01 23:13:13 -0800231 "libprocinfo",
Josh Gao76e1e302021-01-26 15:53:11 -0800232 "libprotobuf-cpp-lite",
Peter Collingbournef8622522020-04-07 14:07:32 -0700233 ],
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800234
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000235 target: {
236 recovery: {
237 exclude_static_libs: [
Martin Stjernholma2cc8932019-10-23 21:32:43 +0100238 "libdexfile_support",
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000239 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100240 exclude_runtime_libs: [
241 "libdexfile",
242 ],
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000243 },
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700244 vendor_ramdisk: {
245 exclude_static_libs: [
246 "libdexfile_support",
247 ],
Martin Stjernholm3784b9d2021-08-26 21:18:43 +0100248 exclude_runtime_libs: [
249 "libdexfile",
250 ],
Yifan Hong2ec92cf2020-10-27 16:25:45 -0700251 },
Christopher Ferris48d6e042023-07-31 14:24:01 -0700252 ramdisk: {
253 exclude_static_libs: [
254 "libdexfile_support",
255 ],
256 exclude_runtime_libs: [
257 "libdexfile",
258 ],
259 },
260 android: {
261 runtime_libs: [
262 "libdexfile", // libdexfile_support dependency
263 ],
264 },
Martin Stjernholmbb4f2b42018-12-19 14:28:33 +0000265 },
Christopher Ferris4ae266c2019-04-03 09:27:12 -0700266
267 product_variables: {
268 debuggable: {
269 cflags: ["-DROOT_POSSIBLE"],
270 },
Christopher Ferris7aad2562021-09-24 00:06:38 -0700271
272 malloc_not_svelte: {
273 cflags: ["-DUSE_SCUDO"],
274 whole_static_libs: ["libscudo"],
275 srcs: ["libdebuggerd/scudo.cpp"],
276 header_libs: ["scudo_headers"],
277 },
Christopher Ferris4ae266c2019-04-03 09:27:12 -0700278 },
Josh Gaocbe70cb2016-10-18 18:17:52 -0700279}
280
Josh Gao76e1e302021-01-26 15:53:11 -0800281cc_binary {
282 name: "pbtombstone",
283 defaults: ["debuggerd_defaults"],
284 srcs: ["pbtombstone.cpp"],
285 static_libs: [
286 "libbase",
287 "libdebuggerd",
288 "liblog",
289 "libprotobuf-cpp-lite",
290 "libtombstone_proto",
291 "libunwindstack",
292 ],
293}
294
Christopher Ferrisfe751c52021-04-16 09:40:40 -0700295cc_test_library {
296 name: "libcrash_test",
297 defaults: ["debuggerd_defaults"],
298 srcs: ["crash_test.cpp"],
299}
300
Josh Gaocbe70cb2016-10-18 18:17:52 -0700301cc_test {
302 name: "debuggerd_test",
303 defaults: ["debuggerd_defaults"],
Josh Gao6cad1392019-08-27 16:02:38 -0700304 require_root: true,
Josh Gaocbe70cb2016-10-18 18:17:52 -0700305
306 cflags: ["-Wno-missing-field-initializers"],
307 srcs: [
308 "libdebuggerd/test/dump_memory_test.cpp",
309 "libdebuggerd/test/elf_fake.cpp",
310 "libdebuggerd/test/log_fake.cpp",
311 "libdebuggerd/test/open_files_list_test.cpp",
Peter Collingbourne47d784e2021-11-05 18:40:52 -0700312 "libdebuggerd/test/utility_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700313 ],
314
315 target: {
316 android: {
317 srcs: [
Josh Gaoae9d7672017-03-24 16:26:03 -0700318 "client/debuggerd_client_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700319 "debuggerd_test.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700320 ],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800321 static_libs: [
322 "libasync_safe",
323 "libtombstoned_client_static",
324 ],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700325 },
326 },
327
328 shared_libs: [
Josh Gaocbe70cb2016-10-18 18:17:52 -0700329 "libbase",
330 "libcutils",
Josh Gaoae9d7672017-03-24 16:26:03 -0700331 "libdebuggerd_client",
Narayan Kamatha73df602017-05-24 15:07:25 +0100332 "liblog",
Elliott Hughesdc699a22018-02-16 17:58:14 -0800333 "libnativehelper",
Martin Stjernholm852b64e2019-02-20 17:01:24 +0000334 "libunwindstack",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700335 ],
336
337 static_libs: [
Josh Gao352a8452017-03-30 16:46:21 -0700338 "libdebuggerd",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800339 "libgmock",
Peter Collingbourned00a5772020-07-20 23:11:16 -0700340 "libminijail",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700341 ],
342
Josh Gaoa48b41b2019-12-13 14:11:04 -0800343 header_libs: [
344 "bionic_libc_platform_headers",
Mitch Phillipse0b4bb12020-02-14 14:54:31 -0800345 "gwp_asan_headers",
Josh Gaoa48b41b2019-12-13 14:11:04 -0800346 ],
347
Josh Gaocbe70cb2016-10-18 18:17:52 -0700348 local_include_dirs: [
349 "libdebuggerd",
350 ],
351
352 compile_multilib: "both",
353 multilib: {
354 lib32: {
355 stem: "debuggerd_test32",
356 },
357 lib64: {
358 stem: "debuggerd_test64",
359 },
360 },
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700361
Christopher Ferrisfe751c52021-04-16 09:40:40 -0700362 data: [
363 ":libcrash_test",
364 ],
365
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700366 test_suites: ["device-tests"],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700367}
368
Josh Gaoa42314e2017-12-19 15:08:19 -0800369cc_benchmark {
370 name: "debuggerd_benchmark",
371 defaults: ["debuggerd_defaults"],
372 srcs: ["debuggerd_benchmark.cpp"],
373 shared_libs: [
374 "libbase",
375 "libdebuggerd_client",
376 ],
377}
378
Josh Gaocbe70cb2016-10-18 18:17:52 -0700379cc_binary {
380 name: "crash_dump",
381 srcs: [
382 "crash_dump.cpp",
Shikha Panwarabde59e2023-02-03 15:05:18 +0000383 "tombstone_handler.cpp",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700384 "util.cpp",
385 ],
386 defaults: ["debuggerd_defaults"],
387
388 compile_multilib: "both",
389 multilib: {
390 lib32: {
391 suffix: "32",
392 },
393 lib64: {
394 suffix: "64",
395 },
396 },
397
Josh Gaoa48b41b2019-12-13 14:11:04 -0800398 header_libs: [
399 "bionic_libc_platform_headers",
400 ],
401
Josh Gaoe73c9322017-02-08 16:06:26 -0800402 static_libs: [
Narayan Kamath2d377cd2017-05-10 10:58:59 +0100403 "libtombstoned_client_static",
Josh Gaoe73c9322017-02-08 16:06:26 -0800404 "libdebuggerd",
405 "libcutils",
Josh Gao76e1e302021-01-26 15:53:11 -0800406
407 "libtombstone_proto",
408 "libprotobuf-cpp-lite",
Josh Gaoe73c9322017-02-08 16:06:26 -0800409 ],
410
Josh Gaocbe70cb2016-10-18 18:17:52 -0700411 shared_libs: [
Josh Gaocbe70cb2016-10-18 18:17:52 -0700412 "libbase",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700413 "liblog",
414 "libprocinfo",
Josh Gao2b2ae0c2017-08-21 14:31:17 -0700415 "libunwindstack",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700416 ],
Peter Collingbourneb72e7482020-03-16 18:14:13 -0700417
418 apex_available: [
419 "com.android.runtime",
420 ],
Peter Collingbournea2739da2022-02-02 17:00:42 -0800421
422 // Required for tests.
423 required: ["crash_dump.policy"],
Josh Gaocbe70cb2016-10-18 18:17:52 -0700424}
425
426cc_binary {
427 name: "debuggerd",
428 srcs: [
429 "debuggerd.cpp",
430 ],
431 defaults: ["debuggerd_defaults"],
432
433 shared_libs: [
434 "libbase",
435 "libdebuggerd_client",
436 "liblog",
Josh Gao0915f232017-06-27 14:08:05 -0700437 "libprocinfo",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700438 ],
439
440 local_include_dirs: ["include"],
441}
442
Nikita Ioffe75be7842022-10-24 15:31:11 +0100443cc_defaults {
444 name: "tombstoned_defaults",
Josh Gaocbe70cb2016-10-18 18:17:52 -0700445 srcs: [
446 "util.cpp",
447 "tombstoned/intercept_manager.cpp",
448 "tombstoned/tombstoned.cpp",
449 ],
450 defaults: ["debuggerd_defaults"],
451
Josh Gaoa48b41b2019-12-13 14:11:04 -0800452 header_libs: [
453 "bionic_libc_platform_headers",
454 "libdebuggerd_common_headers"
455 ],
Narayan Kamatha73df602017-05-24 15:07:25 +0100456
Josh Gaocbe70cb2016-10-18 18:17:52 -0700457 static_libs: [
458 "libbase",
459 "libcutils",
460 "libevent",
461 "liblog",
462 ],
Nikita Ioffe75be7842022-10-24 15:31:11 +0100463}
Josh Gaocbe70cb2016-10-18 18:17:52 -0700464
Nikita Ioffe75be7842022-10-24 15:31:11 +0100465cc_binary {
466 name: "tombstoned",
467 defaults: ["tombstoned_defaults"],
Elliott Hughesdc699a22018-02-16 17:58:14 -0800468 init_rc: ["tombstoned/tombstoned.rc"],
Josh Gao9c02dc52016-06-15 17:29:00 -0700469}
Ray Essickbd3ba782020-01-21 15:21:08 -0800470
Nikita Ioffe75be7842022-10-24 15:31:11 +0100471cc_binary {
472 name: "tombstoned.microdroid",
473 defaults: ["tombstoned_defaults"],
474 init_rc: ["tombstoned/tombstoned.microdroid.rc"],
475}
476
Ray Essickbd3ba782020-01-21 15:21:08 -0800477prebuilt_etc {
478 name: "crash_dump.policy",
479 sub_dir: "seccomp_policy",
480 filename_from_src: true,
481 arch: {
482 arm: {
483 src: "seccomp_policy/crash_dump.arm.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000484 required: [
485 "crash_dump.policy_other",
486 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800487 },
488 arm64: {
489 src: "seccomp_policy/crash_dump.arm64.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000490 required: [
491 "crash_dump.policy_other",
492 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800493 },
Chen Guoyina22af662022-10-12 22:32:55 +0800494 riscv64: {
495 src: "seccomp_policy/crash_dump.riscv64.policy",
496 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800497 x86: {
498 src: "seccomp_policy/crash_dump.x86.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000499 required: [
500 "crash_dump.policy_other",
501 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800502 },
503 x86_64: {
504 src: "seccomp_policy/crash_dump.x86_64.policy",
Elliott Hughes2f883312022-11-14 20:02:28 +0000505 required: [
506 "crash_dump.policy_other",
507 ],
Ray Essickbd3ba782020-01-21 15:21:08 -0800508 },
509 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800510}
511
512
Elliott Hughes2f883312022-11-14 20:02:28 +0000513// This installs the "other" architecture (so 32-bit on 64-bit device).
Ray Essickbd3ba782020-01-21 15:21:08 -0800514prebuilt_etc {
515 name: "crash_dump.policy_other",
516 sub_dir: "seccomp_policy",
517 filename_from_src: true,
518 arch: {
519 arm: {
520 src: "seccomp_policy/crash_dump.arm64.policy",
521 },
522 arm64: {
523 src: "seccomp_policy/crash_dump.arm.policy",
524 },
Elliott Hughes857e29c2023-03-20 15:48:30 -0700525 riscv64: {
526 enabled: false,
527 },
Ray Essickbd3ba782020-01-21 15:21:08 -0800528 x86: {
529 src: "seccomp_policy/crash_dump.x86_64.policy",
530 },
531 x86_64: {
532 src: "seccomp_policy/crash_dump.x86.policy",
533 },
534 },
535}