| # 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/58755): Deprecate `gopackage` in favor of `library`. |
| if (defined(invoker.gopackage)) { |
| gopackages = [ invoker.gopackage ] |
| } |
| |
| forward_variables_from(invoker, "*") |
| } |
| } |