diff options
Diffstat (limited to 'go/tools/go_bin_runner/BUILD.bazel')
-rw-r--r-- | go/tools/go_bin_runner/BUILD.bazel | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/go/tools/go_bin_runner/BUILD.bazel b/go/tools/go_bin_runner/BUILD.bazel new file mode 100644 index 00000000..91be016e --- /dev/null +++ b/go/tools/go_bin_runner/BUILD.bazel @@ -0,0 +1,39 @@ +# gazelle:exclude + +load("//go:def.bzl", "go_binary", "go_library") +load("//go/private/rules:go_bin_for_host.bzl", "go_bin_for_host") + +go_bin_for_host( + name = "go_bin_for_host", + visibility = ["//visibility:private"], +) + +go_library( + name = "go_bin_runner_lib", + srcs = [ + "main.go", + "process.go", + ], + importpath = "github.com/bazelbuild/rules_go/go/tools/go_bin_runner", + visibility = ["//visibility:private"], + deps = [ + "//go/runfiles", + ], +) + +go_binary( + name = "go_bin_runner", + data = [":go_bin_for_host"], + embed = [":go_bin_runner_lib"], + visibility = ["//go:__pkg__"], + x_defs = { + "GoBinRlocationPath": "$(rlocationpath :go_bin_for_host)", + }, +) + +filegroup( + name = "all_files", + testonly = True, + srcs = glob(["**"]), + visibility = ["//visibility:public"], +) |