blob: bb886a916bb4b59f19479a81f4bea963480be864 [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/sdk_source_set.gni")
# "fidl" is used in low-level contexts such as early system
# boot, hence cannot depend on the C++ standard library, and must only introduce
# minimal symbols into dependent targets. As such, these libraries need to be
# static libraries rather than source sets, as we need the Unix librarian
# algorithm to apply so that only object files corresponding to the used
# functions will be linked to the final binary.
sdk_source_set("fidl") {
category = "partner"
api = "//sdk/lib/fidl/fidl.api"
sdk_name = "fidl"
# TODO(https://fxbug.dev/42172264): We should represent the library as a
# `sdk_static_library` when supported.
build_as_static = true
stable = true
public = [ "include/lib/fidl/epitaph.h" ]
sources = [ "epitaph.c" ]
deps = [ "//sdk/lib/fidl_base" ]
public_deps = [
"//sdk/lib/fidl_base",
"//src/zircon/lib/zircon",
]
# TODO(https://fxbug.dev/42052612): GN check fails without this condition.
if (zircon_toolchain != false) {
public_deps += [ "//zircon/system/public" ]
}
public_configs = [ ":fidl.headers" ]
}
config("fidl.headers") {
include_dirs = [ "include" ]
}