blob: bf56d179944153ca2a7eeb82a6bb3ab60bf51767 [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("backtrace") {
sdk = "shared"
sdk_headers = [
"backtrace/backtrace-supported.h",
"backtrace/backtrace.h",
]
shared = true
include_dirs = [ "include/backtrace" ]
sources = [
"alloc.c",
"dwarf.c",
"elf.c",
"fileline.c",
"posix.c",
"read.c",
"sort.c",
"state.c",
]
# 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" ]
}
}