blob: 8e32adbf937d31686976e5d91e989975c10a92e8 [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/resource.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
}
resource(target_name) {
forward_variables_from(invoker,
[
"testonly",
"visibility",
])
data_deps = [ "//src/sys/pkg/bin/grand-swd-binary" ]
sources = [ "$root_out_dir/grand_swd_binary" ]
outputs = [ "bin/$output_name" ]
}
}