Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "debuggerd_defaults", |
| 3 | cflags: [ |
| 4 | "-Wall", |
| 5 | "-Wextra", |
Josh Gao | c7fe060 | 2017-03-13 14:13:29 -0700 | [diff] [blame] | 6 | "-Werror", |
Josh Gao | 2b2ae0c | 2017-08-21 14:31:17 -0700 | [diff] [blame] | 7 | "-Wno-unused-argument", |
| 8 | "-Wno-unused-function", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 9 | "-Wno-nullability-completeness", |
| 10 | "-Os", |
| 11 | ], |
| 12 | |
| 13 | local_include_dirs: ["include"], |
| 14 | } |
| 15 | |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 16 | cc_library_headers { |
| 17 | name: "libdebuggerd_common_headers", |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 18 | export_include_dirs: ["common/include"], |
Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 19 | recovery_available: true, |
Yifan Hong | 2ec92cf | 2020-10-27 16:25:45 -0700 | [diff] [blame] | 20 | vendor_ramdisk_available: true, |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 21 | } |
| 22 | |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 23 | cc_library_shared { |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 24 | name: "libtombstoned_client", |
| 25 | defaults: ["debuggerd_defaults"], |
| 26 | srcs: [ |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 27 | "tombstoned/tombstoned_client.cpp", |
| 28 | "util.cpp", |
| 29 | ], |
| 30 | |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 31 | header_libs: ["libdebuggerd_common_headers"], |
| 32 | |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 33 | static_libs: [ |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 34 | "libasync_safe", |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 35 | ], |
| 36 | |
| 37 | shared_libs: [ |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 38 | "libbase", |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 39 | "libcutils", |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 40 | ], |
| 41 | |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 42 | export_header_lib_headers: ["libdebuggerd_common_headers"], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 43 | export_include_dirs: ["tombstoned/include"], |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 44 | } |
| 45 | |
Josh Gao | 9da1f51 | 2018-08-06 15:38:29 -0700 | [diff] [blame] | 46 | // Utility library to talk to tombstoned and get an output fd. |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 47 | cc_library_static { |
| 48 | name: "libtombstoned_client_static", |
| 49 | defaults: ["debuggerd_defaults"], |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 50 | recovery_available: true, |
Yifan Hong | 2ec92cf | 2020-10-27 16:25:45 -0700 | [diff] [blame] | 51 | vendor_ramdisk_available: true, |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 52 | srcs: [ |
| 53 | "tombstoned/tombstoned_client.cpp", |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 54 | "util.cpp", |
| 55 | ], |
| 56 | |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 57 | header_libs: ["libdebuggerd_common_headers"], |
| 58 | |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 59 | whole_static_libs: [ |
Christopher Ferris | ac22578 | 2017-04-25 11:23:10 -0700 | [diff] [blame] | 60 | "libasync_safe", |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 61 | "libcutils", |
| 62 | "libbase", |
| 63 | ], |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 64 | |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 65 | export_header_lib_headers: ["libdebuggerd_common_headers"], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 66 | export_include_dirs: ["tombstoned/include"], |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | // Core implementation, linked into libdebuggerd_handler and the dynamic linker. |
Josh Gao | 9c02dc5 | 2016-06-15 17:29:00 -0700 | [diff] [blame] | 70 | cc_library_static { |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 71 | name: "libdebuggerd_handler_core", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 72 | defaults: ["debuggerd_defaults"], |
Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 73 | recovery_available: true, |
Yifan Hong | 2ec92cf | 2020-10-27 16:25:45 -0700 | [diff] [blame] | 74 | vendor_ramdisk_available: true, |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 75 | srcs: ["handler/debuggerd_handler.cpp"], |
Josh Gao | 9c02dc5 | 2016-06-15 17:29:00 -0700 | [diff] [blame] | 76 | |
Josh Gao | fdf832d | 2017-08-25 18:00:18 -0700 | [diff] [blame] | 77 | header_libs: [ |
| 78 | "libbase_headers", |
| 79 | "libdebuggerd_common_headers", |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 80 | "bionic_libc_platform_headers", |
Josh Gao | fdf832d | 2017-08-25 18:00:18 -0700 | [diff] [blame] | 81 | ], |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 82 | |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 83 | whole_static_libs: [ |
Christopher Ferris | ac22578 | 2017-04-25 11:23:10 -0700 | [diff] [blame] | 84 | "libasync_safe", |
Josh Gao | 2b2ae0c | 2017-08-21 14:31:17 -0700 | [diff] [blame] | 85 | "libcutils", |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 86 | "libdebuggerd", |
| 87 | ], |
| 88 | |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 89 | export_header_lib_headers: ["libdebuggerd_common_headers"], |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 90 | export_include_dirs: ["include"], |
| 91 | } |
| 92 | |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 93 | // Implementation with a no-op fallback. |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 94 | cc_library_static { |
| 95 | name: "libdebuggerd_handler", |
| 96 | defaults: ["debuggerd_defaults"], |
| 97 | srcs: ["handler/debuggerd_fallback_nop.cpp"], |
| 98 | |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 99 | header_libs: ["bionic_libc_platform_headers"], |
| 100 | export_header_lib_headers: ["bionic_libc_platform_headers"], |
| 101 | |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 102 | whole_static_libs: [ |
| 103 | "libdebuggerd_handler_core", |
| 104 | ], |
| 105 | |
| 106 | export_include_dirs: ["include"], |
| 107 | } |
| 108 | |
Martin Stjernholm | a2cc893 | 2019-10-23 21:32:43 +0100 | [diff] [blame] | 109 | // Fallback implementation, for use in the Bionic linker only. |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 110 | cc_library_static { |
| 111 | name: "libdebuggerd_handler_fallback", |
Martin Stjernholm | a2cc893 | 2019-10-23 21:32:43 +0100 | [diff] [blame] | 112 | visibility: ["//bionic/linker"], |
| 113 | apex_available: [ |
| 114 | "com.android.runtime", |
| 115 | "//apex_available:platform", |
| 116 | ], |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 117 | defaults: ["debuggerd_defaults"], |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 118 | recovery_available: true, |
Yifan Hong | 2ec92cf | 2020-10-27 16:25:45 -0700 | [diff] [blame] | 119 | vendor_ramdisk_available: true, |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 120 | srcs: [ |
| 121 | "handler/debuggerd_fallback.cpp", |
| 122 | ], |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 123 | |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 124 | whole_static_libs: [ |
| 125 | "libdebuggerd_handler_core", |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 126 | "libtombstoned_client_static", |
Christopher Ferris | ac22578 | 2017-04-25 11:23:10 -0700 | [diff] [blame] | 127 | "libasync_safe", |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 128 | "libbase", |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 129 | "libdebuggerd", |
Martin Stjernholm | a2cc893 | 2019-10-23 21:32:43 +0100 | [diff] [blame] | 130 | "libunwindstack_no_dex", |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 131 | "liblzma", |
| 132 | "libcutils", |
| 133 | ], |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 134 | |
| 135 | header_libs: ["bionic_libc_platform_headers"], |
| 136 | export_header_lib_headers: ["bionic_libc_platform_headers"], |
| 137 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 138 | export_include_dirs: ["include"], |
| 139 | } |
| 140 | |
| 141 | cc_library { |
| 142 | name: "libdebuggerd_client", |
| 143 | defaults: ["debuggerd_defaults"], |
| 144 | srcs: [ |
| 145 | "client/debuggerd_client.cpp", |
| 146 | "util.cpp", |
| 147 | ], |
| 148 | |
| 149 | shared_libs: [ |
| 150 | "libbase", |
| 151 | "libcutils", |
Josh Gao | 4175cee | 2019-01-04 13:57:09 -0800 | [diff] [blame] | 152 | "libprocinfo", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 153 | ], |
Josh Gao | e1aa0ca | 2017-03-01 17:23:22 -0800 | [diff] [blame] | 154 | |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 155 | header_libs: [ |
| 156 | "libdebuggerd_common_headers", |
| 157 | "bionic_libc_platform_headers", |
| 158 | ], |
| 159 | export_header_lib_headers: [ |
| 160 | "libdebuggerd_common_headers", |
| 161 | "bionic_libc_platform_headers", |
| 162 | ], |
| 163 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 164 | export_include_dirs: ["include"], |
| 165 | } |
| 166 | |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 167 | cc_library_static { |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 168 | name: "libdebuggerd", |
| 169 | defaults: ["debuggerd_defaults"], |
Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 170 | recovery_available: true, |
Yifan Hong | 2ec92cf | 2020-10-27 16:25:45 -0700 | [diff] [blame] | 171 | vendor_ramdisk_available: true, |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 172 | |
| 173 | srcs: [ |
| 174 | "libdebuggerd/backtrace.cpp", |
Mitch Phillips | e0b4bb1 | 2020-02-14 14:54:31 -0800 | [diff] [blame] | 175 | "libdebuggerd/gwp_asan.cpp", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 176 | "libdebuggerd/open_files_list.cpp", |
Peter Collingbourne | f862252 | 2020-04-07 14:07:32 -0700 | [diff] [blame] | 177 | "libdebuggerd/scudo.cpp", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 178 | "libdebuggerd/tombstone.cpp", |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 179 | "libdebuggerd/tombstone_proto.cpp", |
| 180 | "libdebuggerd/tombstone_proto_to_text.cpp", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 181 | "libdebuggerd/utility.cpp", |
| 182 | ], |
| 183 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 184 | local_include_dirs: ["libdebuggerd/include"], |
| 185 | export_include_dirs: ["libdebuggerd/include"], |
Josh Gao | 9c02dc5 | 2016-06-15 17:29:00 -0700 | [diff] [blame] | 186 | |
Peter Collingbourne | f862252 | 2020-04-07 14:07:32 -0700 | [diff] [blame] | 187 | include_dirs: [ |
| 188 | // Needed for private/bionic_fdsan.h |
| 189 | "bionic/libc", |
| 190 | |
| 191 | // Needed for scudo/interface.h |
| 192 | "external/scudo/standalone/include", |
| 193 | ], |
Mitch Phillips | e0b4bb1 | 2020-02-14 14:54:31 -0800 | [diff] [blame] | 194 | header_libs: [ |
| 195 | "bionic_libc_platform_headers", |
| 196 | "gwp_asan_headers", |
| 197 | ], |
Josh Gao | ce841d9 | 2018-08-06 18:26:42 -0700 | [diff] [blame] | 198 | |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 199 | static_libs: [ |
Martin Stjernholm | a2cc893 | 2019-10-23 21:32:43 +0100 | [diff] [blame] | 200 | "libdexfile_support", // libunwindstack dependency |
Christopher Ferris | 9a8c855 | 2017-08-11 15:29:19 -0700 | [diff] [blame] | 201 | "libunwindstack", |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 202 | "liblzma", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 203 | "libbase", |
| 204 | "libcutils", |
| 205 | "liblog", |
| 206 | ], |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 207 | |
Peter Collingbourne | f862252 | 2020-04-07 14:07:32 -0700 | [diff] [blame] | 208 | whole_static_libs: [ |
Josh Gao | 618cea3 | 2021-01-26 17:45:43 -0800 | [diff] [blame] | 209 | "libasync_safe", |
Peter Collingbourne | f862252 | 2020-04-07 14:07:32 -0700 | [diff] [blame] | 210 | "gwp_asan_crash_handler", |
| 211 | "libscudo", |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 212 | "libtombstone_proto", |
| 213 | "libprotobuf-cpp-lite", |
Peter Collingbourne | f862252 | 2020-04-07 14:07:32 -0700 | [diff] [blame] | 214 | ], |
Mitch Phillips | e0b4bb1 | 2020-02-14 14:54:31 -0800 | [diff] [blame] | 215 | |
Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 216 | target: { |
| 217 | recovery: { |
| 218 | exclude_static_libs: [ |
Martin Stjernholm | a2cc893 | 2019-10-23 21:32:43 +0100 | [diff] [blame] | 219 | "libdexfile_support", |
Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 220 | ], |
| 221 | }, |
Yifan Hong | 2ec92cf | 2020-10-27 16:25:45 -0700 | [diff] [blame] | 222 | vendor_ramdisk: { |
| 223 | exclude_static_libs: [ |
| 224 | "libdexfile_support", |
| 225 | ], |
| 226 | }, |
Martin Stjernholm | bb4f2b4 | 2018-12-19 14:28:33 +0000 | [diff] [blame] | 227 | }, |
Christopher Ferris | 4ae266c | 2019-04-03 09:27:12 -0700 | [diff] [blame] | 228 | |
| 229 | product_variables: { |
| 230 | debuggable: { |
| 231 | cflags: ["-DROOT_POSSIBLE"], |
| 232 | }, |
| 233 | }, |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 234 | } |
| 235 | |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 236 | cc_binary { |
| 237 | name: "pbtombstone", |
| 238 | defaults: ["debuggerd_defaults"], |
| 239 | srcs: ["pbtombstone.cpp"], |
| 240 | static_libs: [ |
| 241 | "libbase", |
| 242 | "libdebuggerd", |
| 243 | "liblog", |
| 244 | "libprotobuf-cpp-lite", |
| 245 | "libtombstone_proto", |
| 246 | "libunwindstack", |
| 247 | ], |
| 248 | } |
| 249 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 250 | cc_test { |
| 251 | name: "debuggerd_test", |
| 252 | defaults: ["debuggerd_defaults"], |
Josh Gao | 6cad139 | 2019-08-27 16:02:38 -0700 | [diff] [blame] | 253 | require_root: true, |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 254 | |
| 255 | cflags: ["-Wno-missing-field-initializers"], |
| 256 | srcs: [ |
| 257 | "libdebuggerd/test/dump_memory_test.cpp", |
| 258 | "libdebuggerd/test/elf_fake.cpp", |
| 259 | "libdebuggerd/test/log_fake.cpp", |
| 260 | "libdebuggerd/test/open_files_list_test.cpp", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 261 | "libdebuggerd/test/tombstone_test.cpp", |
| 262 | ], |
| 263 | |
| 264 | target: { |
| 265 | android: { |
| 266 | srcs: [ |
Josh Gao | ae9d767 | 2017-03-24 16:26:03 -0700 | [diff] [blame] | 267 | "client/debuggerd_client_test.cpp", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 268 | "debuggerd_test.cpp", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 269 | ], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 270 | static_libs: [ |
| 271 | "libasync_safe", |
| 272 | "libtombstoned_client_static", |
| 273 | ], |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 274 | }, |
| 275 | }, |
| 276 | |
| 277 | shared_libs: [ |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 278 | "libbase", |
| 279 | "libcutils", |
Josh Gao | ae9d767 | 2017-03-24 16:26:03 -0700 | [diff] [blame] | 280 | "libdebuggerd_client", |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 281 | "liblog", |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 282 | "libnativehelper", |
Martin Stjernholm | 852b64e | 2019-02-20 17:01:24 +0000 | [diff] [blame] | 283 | "libunwindstack", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 284 | ], |
| 285 | |
| 286 | static_libs: [ |
Josh Gao | 352a845 | 2017-03-30 16:46:21 -0700 | [diff] [blame] | 287 | "libdebuggerd", |
Mitch Phillips | e0b4bb1 | 2020-02-14 14:54:31 -0800 | [diff] [blame] | 288 | "libgmock", |
Peter Collingbourne | d00a577 | 2020-07-20 23:11:16 -0700 | [diff] [blame] | 289 | "libminijail", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 290 | ], |
| 291 | |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 292 | header_libs: [ |
| 293 | "bionic_libc_platform_headers", |
Mitch Phillips | e0b4bb1 | 2020-02-14 14:54:31 -0800 | [diff] [blame] | 294 | "gwp_asan_headers", |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 295 | ], |
| 296 | |
Peter Collingbourne | f862252 | 2020-04-07 14:07:32 -0700 | [diff] [blame] | 297 | include_dirs: [ |
| 298 | "external/scudo/standalone/include", |
| 299 | ], |
| 300 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 301 | local_include_dirs: [ |
| 302 | "libdebuggerd", |
| 303 | ], |
| 304 | |
| 305 | compile_multilib: "both", |
| 306 | multilib: { |
| 307 | lib32: { |
| 308 | stem: "debuggerd_test32", |
| 309 | }, |
| 310 | lib64: { |
| 311 | stem: "debuggerd_test64", |
| 312 | }, |
| 313 | }, |
Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 314 | |
| 315 | test_suites: ["device-tests"], |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 316 | } |
| 317 | |
Josh Gao | a42314e | 2017-12-19 15:08:19 -0800 | [diff] [blame] | 318 | cc_benchmark { |
| 319 | name: "debuggerd_benchmark", |
| 320 | defaults: ["debuggerd_defaults"], |
| 321 | srcs: ["debuggerd_benchmark.cpp"], |
| 322 | shared_libs: [ |
| 323 | "libbase", |
| 324 | "libdebuggerd_client", |
| 325 | ], |
| 326 | } |
| 327 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 328 | cc_binary { |
| 329 | name: "crash_dump", |
| 330 | srcs: [ |
| 331 | "crash_dump.cpp", |
| 332 | "util.cpp", |
| 333 | ], |
| 334 | defaults: ["debuggerd_defaults"], |
| 335 | |
| 336 | compile_multilib: "both", |
| 337 | multilib: { |
| 338 | lib32: { |
| 339 | suffix: "32", |
| 340 | }, |
| 341 | lib64: { |
| 342 | suffix: "64", |
| 343 | }, |
| 344 | }, |
| 345 | |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 346 | header_libs: [ |
| 347 | "bionic_libc_platform_headers", |
| 348 | ], |
| 349 | |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 350 | static_libs: [ |
Narayan Kamath | 2d377cd | 2017-05-10 10:58:59 +0100 | [diff] [blame] | 351 | "libtombstoned_client_static", |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 352 | "libdebuggerd", |
| 353 | "libcutils", |
Josh Gao | 76e1e30 | 2021-01-26 15:53:11 -0800 | [diff] [blame] | 354 | |
| 355 | "libtombstone_proto", |
| 356 | "libprotobuf-cpp-lite", |
Josh Gao | e73c932 | 2017-02-08 16:06:26 -0800 | [diff] [blame] | 357 | ], |
| 358 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 359 | shared_libs: [ |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 360 | "libbase", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 361 | "liblog", |
| 362 | "libprocinfo", |
Josh Gao | 2b2ae0c | 2017-08-21 14:31:17 -0700 | [diff] [blame] | 363 | "libunwindstack", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 364 | ], |
Peter Collingbourne | b72e748 | 2020-03-16 18:14:13 -0700 | [diff] [blame] | 365 | |
| 366 | apex_available: [ |
| 367 | "com.android.runtime", |
| 368 | ], |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 369 | } |
| 370 | |
| 371 | cc_binary { |
| 372 | name: "debuggerd", |
| 373 | srcs: [ |
| 374 | "debuggerd.cpp", |
| 375 | ], |
| 376 | defaults: ["debuggerd_defaults"], |
| 377 | |
| 378 | shared_libs: [ |
| 379 | "libbase", |
| 380 | "libdebuggerd_client", |
| 381 | "liblog", |
Josh Gao | 0915f23 | 2017-06-27 14:08:05 -0700 | [diff] [blame] | 382 | "libprocinfo", |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 383 | ], |
| 384 | |
| 385 | local_include_dirs: ["include"], |
| 386 | } |
| 387 | |
| 388 | cc_binary { |
| 389 | name: "tombstoned", |
| 390 | srcs: [ |
| 391 | "util.cpp", |
| 392 | "tombstoned/intercept_manager.cpp", |
| 393 | "tombstoned/tombstoned.cpp", |
| 394 | ], |
| 395 | defaults: ["debuggerd_defaults"], |
| 396 | |
Josh Gao | a48b41b | 2019-12-13 14:11:04 -0800 | [diff] [blame] | 397 | header_libs: [ |
| 398 | "bionic_libc_platform_headers", |
| 399 | "libdebuggerd_common_headers" |
| 400 | ], |
Narayan Kamath | a73df60 | 2017-05-24 15:07:25 +0100 | [diff] [blame] | 401 | |
Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 402 | static_libs: [ |
| 403 | "libbase", |
| 404 | "libcutils", |
| 405 | "libevent", |
| 406 | "liblog", |
| 407 | ], |
| 408 | |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 409 | init_rc: ["tombstoned/tombstoned.rc"], |
Josh Gao | 9c02dc5 | 2016-06-15 17:29:00 -0700 | [diff] [blame] | 410 | } |
Ray Essick | bd3ba78 | 2020-01-21 15:21:08 -0800 | [diff] [blame] | 411 | |
| 412 | prebuilt_etc { |
| 413 | name: "crash_dump.policy", |
| 414 | sub_dir: "seccomp_policy", |
| 415 | filename_from_src: true, |
| 416 | arch: { |
| 417 | arm: { |
| 418 | src: "seccomp_policy/crash_dump.arm.policy", |
| 419 | }, |
| 420 | arm64: { |
| 421 | src: "seccomp_policy/crash_dump.arm64.policy", |
| 422 | }, |
| 423 | x86: { |
| 424 | src: "seccomp_policy/crash_dump.x86.policy", |
| 425 | }, |
| 426 | x86_64: { |
| 427 | src: "seccomp_policy/crash_dump.x86_64.policy", |
| 428 | }, |
| 429 | }, |
| 430 | required: [ |
| 431 | "crash_dump.policy_other", |
| 432 | ], |
| 433 | } |
| 434 | |
| 435 | |
| 436 | // NB -- this installs "the other" architecture. (puts 32 bit config in on 64 bit device) |
| 437 | // or at least that is the intention so that we get both of them populated |
| 438 | prebuilt_etc { |
| 439 | name: "crash_dump.policy_other", |
| 440 | sub_dir: "seccomp_policy", |
| 441 | filename_from_src: true, |
| 442 | arch: { |
| 443 | arm: { |
| 444 | src: "seccomp_policy/crash_dump.arm64.policy", |
| 445 | }, |
| 446 | arm64: { |
| 447 | src: "seccomp_policy/crash_dump.arm.policy", |
| 448 | }, |
| 449 | x86: { |
| 450 | src: "seccomp_policy/crash_dump.x86_64.policy", |
| 451 | }, |
| 452 | x86_64: { |
| 453 | src: "seccomp_policy/crash_dump.x86.policy", |
| 454 | }, |
| 455 | }, |
| 456 | } |