blob: a866bc4ace62c8716a3654b22e7a3fba7e454aa4 [file] [log] [blame] [edit]
# 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("$zx_build/public/gn/migrated_targets.gni")
zx_library("ldmsg") {
sdk = "static"
sdk_headers = [ "ldmsg/ldmsg.h" ]
sdk_migrated = true
sources = [ "ldmsg.c" ]
deps = [ "$zx/system/ulib/zircon" ]
if (zx == "/" && toolchain.base_environment == "user") {
# This library is used by libc, so suppress the circularity.
# This is only needed in the Zircon build.
configs -= [ "$zx_build_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_config:no_safestack",
"$zx_build_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(fxbug.dev/25073): Once a cleaner solution is found, remove this.
"$zx_build_config:no_fuzzer",
]
# TODO(fxb/58162): delete the below and fix compiler warnings
configs += [ "$zx_build_config:Wno-conversion" ]
}
group("tests") {
testonly = true
deps = [ "test:tests" ]
}