1# 2# Copyright 2017 The Abseil Authors. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# https://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17absl_cc_library( 18 NAME 19 stacktrace 20 HDRS 21 "stacktrace.h" 22 "internal/stacktrace_aarch64-inl.inc" 23 "internal/stacktrace_arm-inl.inc" 24 "internal/stacktrace_config.h" 25 "internal/stacktrace_generic-inl.inc" 26 "internal/stacktrace_powerpc-inl.inc" 27 "internal/stacktrace_unimplemented-inl.inc" 28 "internal/stacktrace_win32-inl.inc" 29 "internal/stacktrace_x86-inl.inc" 30 SRCS 31 "stacktrace.cc" 32 COPTS 33 ${ABSL_DEFAULT_COPTS} 34 DEPS 35 absl::debugging_internal 36 absl::config 37 absl::core_headers 38 PUBLIC 39) 40 41absl_cc_library( 42 NAME 43 symbolize 44 HDRS 45 "symbolize.h" 46 "internal/symbolize.h" 47 SRCS 48 "symbolize.cc" 49 "symbolize_elf.inc" 50 "symbolize_unimplemented.inc" 51 "symbolize_win32.inc" 52 COPTS 53 ${ABSL_DEFAULT_COPTS} 54 LINKOPTS 55 ${ABSL_DEFAULT_LINKOPTS} 56 $<$<BOOL:${MINGW}>:"dbghelp"> 57 DEPS 58 absl::debugging_internal 59 absl::demangle_internal 60 absl::base 61 absl::config 62 absl::core_headers 63 absl::dynamic_annotations 64 absl::malloc_internal 65 absl::raw_logging_internal 66 PUBLIC 67) 68 69absl_cc_test( 70 NAME 71 symbolize_test 72 SRCS 73 "symbolize_test.cc" 74 COPTS 75 ${ABSL_TEST_COPTS} 76 $<$<BOOL:${MSVC}>:-Z7> 77 LINKOPTS 78 $<$<BOOL:${MSVC}>:-DEBUG> 79 DEPS 80 absl::stack_consumption 81 absl::symbolize 82 absl::base 83 absl::core_headers 84 absl::memory 85 absl::raw_logging_internal 86 gmock 87) 88 89absl_cc_library( 90 NAME 91 examine_stack 92 HDRS 93 "internal/examine_stack.h" 94 SRCS 95 "internal/examine_stack.cc" 96 COPTS 97 ${ABSL_DEFAULT_COPTS} 98 DEPS 99 absl::stacktrace 100 absl::symbolize 101 absl::config 102 absl::core_headers 103 absl::raw_logging_internal 104) 105 106absl_cc_library( 107 NAME 108 failure_signal_handler 109 HDRS 110 "failure_signal_handler.h" 111 SRCS 112 "failure_signal_handler.cc" 113 COPTS 114 ${ABSL_DEFAULT_COPTS} 115 DEPS 116 absl::examine_stack 117 absl::stacktrace 118 absl::base 119 absl::config 120 absl::core_headers 121 absl::errno_saver 122 absl::raw_logging_internal 123 PUBLIC 124) 125 126absl_cc_test( 127 NAME 128 failure_signal_handler_test 129 SRCS 130 "failure_signal_handler_test.cc" 131 COPTS 132 ${ABSL_TEST_COPTS} 133 DEPS 134 absl::failure_signal_handler 135 absl::stacktrace 136 absl::symbolize 137 absl::strings 138 absl::raw_logging_internal 139 Threads::Threads 140 gmock 141) 142 143absl_cc_library( 144 NAME 145 debugging_internal 146 HDRS 147 "internal/address_is_readable.h" 148 "internal/elf_mem_image.h" 149 "internal/vdso_support.h" 150 SRCS 151 "internal/address_is_readable.cc" 152 "internal/elf_mem_image.cc" 153 "internal/vdso_support.cc" 154 COPTS 155 ${ABSL_DEFAULT_COPTS} 156 DEPS 157 absl::core_headers 158 absl::config 159 absl::dynamic_annotations 160 absl::errno_saver 161 absl::raw_logging_internal 162) 163 164absl_cc_library( 165 NAME 166 demangle_internal 167 HDRS 168 "internal/demangle.h" 169 SRCS 170 "internal/demangle.cc" 171 COPTS 172 ${ABSL_DEFAULT_COPTS} 173 DEPS 174 absl::base 175 absl::core_headers 176 PUBLIC 177) 178 179absl_cc_test( 180 NAME 181 demangle_test 182 SRCS 183 "internal/demangle_test.cc" 184 COPTS 185 ${ABSL_TEST_COPTS} 186 DEPS 187 absl::demangle_internal 188 absl::stack_consumption 189 absl::core_headers 190 absl::memory 191 absl::raw_logging_internal 192 gmock_main 193) 194 195absl_cc_library( 196 NAME 197 leak_check 198 HDRS 199 "leak_check.h" 200 SRCS 201 "leak_check.cc" 202 COPTS 203 ${ABSL_DEFAULT_COPTS} 204 DEPS 205 absl::config 206 absl::core_headers 207 PUBLIC 208) 209 210absl_cc_library( 211 NAME 212 leak_check_disable 213 SRCS 214 "leak_check_disable.cc" 215 COPTS 216 ${ABSL_DEFAULT_COPTS} 217 PUBLIC 218) 219 220absl_cc_library( 221 NAME 222 leak_check_api_enabled_for_testing 223 HDRS 224 "leak_check.h" 225 SRCS 226 "leak_check.cc" 227 COPTS 228 ${ABSL_DEFAULT_COPTS} 229 $<$<BOOL:${ABSL_HAVE_LSAN}>:-DLEAK_SANITIZER> 230 TESTONLY 231) 232 233absl_cc_library( 234 NAME 235 leak_check_api_disabled_for_testing 236 HDRS 237 "leak_check.h" 238 SRCS 239 "leak_check.cc" 240 COPTS 241 ${ABSL_DEFAULT_COPTS} 242 "-ULEAK_SANITIZER" 243 TESTONLY 244) 245 246absl_cc_test( 247 NAME 248 leak_check_test 249 SRCS 250 "leak_check_test.cc" 251 COPTS 252 ${ABSL_TEST_COPTS} 253 "$<$<BOOL:${ABSL_HAVE_LSAN}>:-DABSL_EXPECT_LEAK_SANITIZER>" 254 LINKOPTS 255 "${ABSL_LSAN_LINKOPTS}" 256 DEPS 257 absl::leak_check_api_enabled_for_testing 258 absl::base 259 gmock_main 260) 261 262absl_cc_test( 263 NAME 264 leak_check_no_lsan_test 265 SRCS 266 "leak_check_test.cc" 267 COPTS 268 ${ABSL_TEST_COPTS} 269 "-UABSL_EXPECT_LEAK_SANITIZER" 270 DEPS 271 absl::leak_check_api_disabled_for_testing 272 absl::base 273 gmock_main 274) 275 276absl_cc_test( 277 NAME 278 disabled_leak_check_test 279 SRCS 280 "leak_check_fail_test.cc" 281 COPTS 282 ${ABSL_TEST_COPTS} 283 LINKOPTS 284 "${ABSL_LSAN_LINKOPTS}" 285 DEPS 286 absl::leak_check_api_enabled_for_testing 287 absl::leak_check_disable 288 absl::base 289 absl::raw_logging_internal 290 gmock_main 291) 292 293absl_cc_library( 294 NAME 295 stack_consumption 296 HDRS 297 "internal/stack_consumption.h" 298 SRCS 299 "internal/stack_consumption.cc" 300 COPTS 301 ${ABSL_DEFAULT_COPTS} 302 DEPS 303 absl::config 304 absl::core_headers 305 absl::raw_logging_internal 306 TESTONLY 307) 308 309absl_cc_test( 310 NAME 311 stack_consumption_test 312 SRCS 313 "internal/stack_consumption_test.cc" 314 COPTS 315 ${ABSL_TEST_COPTS} 316 DEPS 317 absl::stack_consumption 318 absl::core_headers 319 absl::raw_logging_internal 320 gmock_main 321) 322 323# component target 324absl_cc_library( 325 NAME 326 debugging 327 COPTS 328 ${ABSL_DEFAULT_COPTS} 329 DEPS 330 absl::stacktrace 331 absl::leak_check 332 PUBLIC 333) 334