blob: 1d3c679518b7d090231286c6e9fe41f6fe97b059 [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.
zx_library("ldmsg") {
sdk = "static"
sdk_headers = [ "ldmsg/ldmsg.h" ]
sources = [ "ldmsg.c" ]
deps = [ "$zx/system/ulib/zircon" ]
if (toolchain.base_environment == "user") {
# This library is used by libc, so suppress the circularity.
configs -= [ "$zx_build/public/gn/config:user" ]
}
# However, it uses <string.h> for memcpy.
deps += [ "$zx/system/ulib/c:headers" ]
# This code is called by the dynamic linker in early startup before
# fancy stacks have been set up. So it can't rely on safe-stack or
# shadow-call-stack ABIs.
configs += [
"$zx_build/public/gn/config:no_safestack",
"$zx_build/public/gn/config:no-shadow-call-stack",
# This library is linked into libc, which is used by libfuzzer.
# Don't instrument it to avoid getting noise in code coverage.
# TODO(25073): Once a cleaner solution is found, remove this.
"$zx_build/public/gn/config:no_fuzzer",
]
}