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