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