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