# 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", # Make this binary usable as a drop-in replacement for the actual go binary with external tools. out = select({ "@platforms//os:windows": "bin/go.exe", "//conditions:default": "bin/go", }), 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"], )