blob: aa7ebabb1580950730a93806f96d4c8315d1bd94 [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.
library("inspector") {
# This should only ever be used as a shared library because it hides
# the otherwise problematic ngunwind symbols.
shared = true
static = false
sdk = "shared"
sdk_headers = [ "inspector/inspector.h" ]
sources = [
"backtrace.cpp",
"debug-info.cpp",
"dso-list.cpp",
"memory.cpp",
"registers.cpp",
"utils.cpp",
]
configs += [ "$zx/public/gn/config:visibility_hidden" ]
public_deps = [
"$zx/system/ulib/zircon:headers",
]
deps = [
"$zx/system/ulib/backtrace-request",
"$zx/system/ulib/elf-search",
"$zx/system/ulib/fbl",
"$zx/system/ulib/pretty",
"$zx/system/ulib/zircon",
"$zx/system/ulib/zxcpp",
"$zx/third_party/ulib/backtrace",
"$zx/third_party/ulib/ngunwind",
]
# Compile this with frame pointers so that if we crash
# the simplistic unwinder will work.
if (configs + [ "$zx/public/gn/config:default_frame_pointers" ] -
[ "$zx/public/gn/config:default_frame_pointers" ] != configs) {
configs -= [ "$zx/public/gn/config:default_frame_pointers" ]
configs += [ "$zx/public/gn/config:frame_pointers" ]
}
}