blob: af4c8b02ea3825909649a44ee47ee399c471df00 [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.
template("go_binary") {
forward_variables_from(invoker, [ "visibility" ])
go_build(target_name) {
# TODO(fxbug.dev/42136747): Deprecate `gopackage` in favor of `library`.
if (defined(invoker.gopackage)) {
gopackages = [ invoker.gopackage ]
}
forward_variables_from(invoker, "*")
}
}