1load("@bazel_skylib//:bzl_library.bzl", "bzl_library") 2 3# The 'go' binary of the current Go toolchain compatible with the host. 4# Use this with `bazel run` to perform utility actions such as `go mod tidy` in 5# a hermetic fashion. 6# Note: This is not meant to and cannot be used as a tool in e.g. a genrule. If 7# you need this functionality, please file an issue describing your use case. 8alias( 9 name = "go", 10 actual = "//go/tools/go_bin_runner", 11 visibility = ["//visibility:public"], 12) 13 14filegroup( 15 name = "all_files", 16 testonly = True, 17 srcs = glob(["**"]) + [ 18 "//go/config:all_files", 19 "//go/constraints/amd64:all_files", 20 "//go/platform:all_files", 21 "//go/runfiles:all_files", 22 "//go/toolchain:all_files", 23 "//go/tools:all_files", 24 "//go/private:all_files", 25 ], 26 visibility = ["//visibility:public"], 27) 28 29filegroup( 30 name = "all_rules", 31 srcs = glob(["*.bzl"]) + [ 32 "//go/platform:all_rules", 33 "//go/private:all_rules", 34 "//go/toolchain:all_rules", 35 ], 36 visibility = ["//visibility:public"], 37) 38 39toolchain_type( 40 name = "toolchain", 41 visibility = ["//visibility:public"], 42) 43 44bzl_library( 45 name = "def", 46 srcs = ["def.bzl"], 47 visibility = ["//visibility:public"], 48 deps = [ 49 "//extras:embed_data", 50 "//extras:gomock", 51 "//go/private:context", 52 "//go/private:go_toolchain", 53 "//go/private:providers", 54 "//go/private/rules:library", 55 "//go/private/rules:nogo", 56 "//go/private/rules:sdk", 57 "//go/private/rules:source", 58 "//go/private/rules:wrappers", 59 "//go/private/tools:path", 60 ], 61) 62 63bzl_library( 64 name = "deps", 65 srcs = ["deps.bzl"], 66 visibility = ["//visibility:public"], 67 deps = [ 68 "//go/private:repositories", 69 "//go/private:sdk", 70 ], 71) 72