blob: 45b36544bc33b26c8aa30aab5df17ce5f5ec6937 [file] [log] [blame]
# Copyright 2025 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")
import("//build/toolchain/hermetic_source_set.gni")
import("//src/zircon/lib/zircon/libzircon.gni")
import("../../libc.gni")
# This code used to be a general <lib/processargs/processargs.h> library. But
# in fact its only users are inside the legacy libc implementation code. So
# now it's just here. It can eventually go away when no legacy C code still
# uses it. It might not be replaced as such until a new bootstrap FIDL
# protocol obviates it entirely.
library_headers("headers") {
visibility = [ ":*" ]
headers = [ "lib/processargs/processargs.h" ]
}
# The legacy C code isn't in the user.basic environment; all of its individual
# caller functions just have equivalent per-function attributes. The easy and
# thorough way to make this compatible with being in deps of those targets is
# to use a basic_abi hermetic_source_set().
libc_source_set("musl-processargs") {
visibility = [ "//zircon/third_party/ulib/musl/*" ]
public_deps = [ ":headers" ]
basic_abi = true
global_symbols = [
"processargs_extract_handles",
"processargs_message_size",
"processargs_read",
"processargs_strings",
]
undefined_symbols = libzircon_linkage_names
sources = [ "processargs.c" ]
deps = [ "//src/zircon/lib/zircon:zircon.as-needed" ]
}