xref: /aosp_15_r20/external/bazelbuild-rules_go/go/tools/go_bin_runner/BUILD.bazel (revision 9bb1b549b6a84214c53be0924760be030e66b93a)
1# gazelle:exclude
2
3load("//go:def.bzl", "go_binary", "go_library")
4load("//go/private/rules:go_bin_for_host.bzl", "go_bin_for_host")
5
6go_bin_for_host(
7    name = "go_bin_for_host",
8    visibility = ["//visibility:private"],
9)
10
11go_library(
12    name = "go_bin_runner_lib",
13    srcs = [
14        "main.go",
15        "process.go",
16    ],
17    importpath = "github.com/bazelbuild/rules_go/go/tools/go_bin_runner",
18    visibility = ["//visibility:private"],
19    deps = [
20        "//go/runfiles",
21    ],
22)
23
24go_binary(
25    name = "go_bin_runner",
26    data = [":go_bin_for_host"],
27    embed = [":go_bin_runner_lib"],
28    visibility = ["//go:__pkg__"],
29    x_defs = {
30        "GoBinRlocationPath": "$(rlocationpath :go_bin_for_host)",
31    },
32)
33
34filegroup(
35    name = "all_files",
36    testonly = True,
37    srcs = glob(["**"]),
38    visibility = ["//visibility:public"],
39)
40