blob: 56713b876acd756602d65edb0f5b94fca8624cdc [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/zircon/zx_library.gni")
group("tests") {
testonly = true
deps = [ "tests" ]
}
zx_library("inspector") {
# This should only ever be used as a shared library because it hides
# the otherwise problematic ngunwind symbols.
sdk = "shared"
sdk_headers = [ "inspector/inspector.h" ]
sources = [
"backtrace.cc",
"debug-info.cc",
"dso-list.cc",
"memory.cc",
"registers.cc",
"utils.cc",
]
deps = [
":gwp-asan",
"//zircon/system/ulib/backtrace-request:backtrace-request-utils",
"//zircon/system/ulib/elf-search",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/pretty",
"//zircon/third_party/ulib/ngunwind",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
# Compile this with frame pointers so that if we crash
# the simplistic unwinder will work.
if (configs + [ "//build/config:default_frame_pointers" ] -
[ "//build/config:default_frame_pointers" ] != configs) {
configs -= [ "//build/config:default_frame_pointers" ]
configs += [ "//build/config:frame_pointers" ]
}
}
# GWP-ASan crash handling utility that wraps //zircon/system/ulib/c/scudo:gwp-asan-common.
source_set("gwp-asan") {
sources = [
"gwp-asan.cc",
"gwp-asan.h",
]
deps = [
"//zircon/system/ulib/c/scudo:gwp-asan-common",
"//zircon/system/ulib/elf-search",
]
}