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