blob: b7cea749c5167794726abb0426088021df1d141f [file] [log] [blame]
# Copyright 2018 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/compiled_action.gni")
import("//build/cpp/fidlmerge_cpp.gni")
# Declares a error_notifier library that contains C++ delegate allowing to
# send errors.
#
# Parameters
#
# fidl_target (required)
# Specifies the fidl target from which to read fidl json.
#
# deps, public_deps, test_only, visibility (optional)
# These parameters are forwarded to the source_set. This template lists
# //garnet/public/lib/error_notifier and the value of fidl_target as public_deps.
#
template("error_notifier_fidl") {
assert(is_fuchsia, "This template can only be used in $target_toolchain.")
assert(defined(invoker.fidl_target),
"error_notifier_fidl requires parameter fidl_target.")
fidl_target = invoker.fidl_target
name = target_name
fidlmerge_cpp(name) {
forward_variables_from(invoker,
[
"deps",
"testonly",
"visibility",
])
fidl_target = "$fidl_target"
template_path =
"//peridot/bin/ledger/fidl/error_notifier/error_notifier.fidlmerge"
generated_source_base = name
generated_source_extensions = [ ".h" ]
public_deps = [
"$fidl_target",
"//garnet/public/lib/fidl/cpp",
"//peridot/bin/ledger/fidl/error_notifier",
]
if (defined(invoker.public_deps)) {
public_deps += invoker.public_deps
}
}
}