blob: b5cdc2c7684410e6f391f6ecccf1f5099c2e650a [file] [log] [blame] [edit]
# Copyright 2017 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/go/go_build.gni")
# A template for an action that creates a Fuchsia Go binary.
#
# Parameters: same as go_build, along with
#
# gopackage (optional)
# The go package containing the main function.
#
# library (optional)
# The GN label for the go_library containing the main function. Alternative
# to gopackage.
#
template("go_binary") {
go_build(target_name) {
# TODO(fxbug.dev/58755): Deprecate `gopackage` in favor of `library`.
if (defined(invoker.gopackage)) {
gopackages = [ invoker.gopackage ]
}
forward_variables_from(invoker, "*")
}
}