blob: 61c067448954292c49d64db229998193ecfcd65e [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/assembly/bootfs_files_for_assembly.gni")
import("//build/zircon/zx_library.gni")
group("tests") {
testonly = true
deps = [ "tests" ]
}
zx_library("inspector") {
sdk = "shared"
sdk_headers = [ "inspector/inspector.h" ]
sources = [
"backtrace.cc",
"debug-info.cc",
"memory.cc",
"registers.cc",
]
deps = [
":gwp-asan",
"//src/lib/debug:backtrace-request-utils",
"//src/lib/unwinder",
"//zircon/system/ulib/elf-search",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/pretty",
]
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" ]
}
}
bootfs_files_for_assembly("bootfs") {
deps = [ ":inspector" ]
}
# 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",
]
}