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