blob: 53d1e0eab5932100e552a748d7079bd7a3b06702 [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/cpp/library_headers.gni")
library_headers("headers") {
headers = [
"runtime/thread.h",
"runtime/tls.h",
]
public_deps = [ "//src/zircon/lib/zircon:headers" ]
}
static_library("runtime") {
public_deps = [ ":headers" ]
sources = [ "thread.cc" ]
deps = [
"//sdk/lib/stdcompat",
"//src/lib/elfldltl",
"//src/zircon/lib/zircon",
"//zircon/system/ulib/zircon-internal",
]
# This code is used in early startup, where safe-stack is not ready yet.
configs += [ "//build/config/sanitizers:no_sanitizers" ]
# This might be necessary if something from stdcompat didn't get inlined. A
# libc++ ABI symbol that's supposedly the same might be COMDAT'd with another
# TU's version that didn't disable the sanitizers.
defines = [ "_LIBCPP_HIDE_FROM_ABI_PER_TU=1" ]
if (zircon_toolchain != false) {
# Make sure the thread_trampoline function has a frame pointer so that
# user-visible thread backtraces are consistent across collection methods.
configs += [ "//build/config:default_frame_pointers" ]
configs -= [ "//build/config:default_frame_pointers" ]
configs += [ "//build/config:frame_pointers" ]
}
}