blob: 9347fd07b212b1420146ef04832454c5e4936b50 [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/migrated_targets.gni")
zx_library("runtime") {
sdk = "source"
sdk_headers = [
"runtime/thread.h",
"runtime/tls.h",
]
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" ]
}
}