blob: 28d25f85fff2837990d6312c4f65a516f5431a2e [file] [log] [blame]
# Copyright 2020 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/dist/renamed_binary.gni")
# Defines a renamed binary based on grand_swd_binary.
#
# GSB is a single binary that merges together multiple SWD programs.
# The entry point to the combined program can identify which sub-program the
# caller intends to run based on the filename of the invocation (`argv[0]`).
#
# This template offers dependents a renamed grand_swd_binary binary.
#
# Parameters
#
# output_name (optional)
# The renamed binary's name.
# Type: string
# Default: target_name
#
# testonly
# visibility
template("grand_swd_binary") {
output_name = target_name
if (defined(invoker.output_name)) {
output_name = invoker.output_name
}
renamed_binary(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
source_deps = [ "//src/sys/pkg/bin/grand-swd-binary" ]
source = "$root_out_dir/grand_swd_binary"
dest = "bin/$output_name"
}
}