blob: 0c657fb203c874fd012a441b2905ccff9e06fb1d [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_unified_binary.
#
# GUB is a single binary that merges together multiple Go 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_unified_binary binary.
#
# Parameters
#
# output_name (optional)
# The renamed binary's name.
# Type: string
# Default: target_name
#
# testonly
# visibility
template("grand_unified_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/go/grand_unified_binary" ]
source = "$root_out_dir/grand_unified_binary"
dest = "bin/$output_name"
}
}