github.com/bazelbuild/rules_go@v0.47.2-0.20240515105122-e7ddb9ea474e/go/BUILD.bazel (about) 1 load("@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. 8 alias( 9 name = "go", 10 actual = "//go/tools/go_bin_runner", 11 visibility = ["//visibility:public"], 12 ) 13 14 filegroup( 15 name = "all_files", 16 testonly = True, 17 srcs = glob(["**"]) + [ 18 "//go/config:all_files", 19 "//go/constraints/amd64:all_files", 20 "//go/constraints/arm:all_files", 21 "//go/platform:all_files", 22 "//go/private:all_files", 23 "//go/runfiles:all_files", 24 "//go/toolchain:all_files", 25 "//go/tools:all_files", 26 ], 27 visibility = ["//visibility:public"], 28 ) 29 30 filegroup( 31 name = "all_rules", 32 srcs = glob(["*.bzl"]) + [ 33 "//go/platform:all_rules", 34 "//go/private:all_rules", 35 "//go/toolchain:all_rules", 36 ], 37 visibility = ["//visibility:public"], 38 ) 39 40 toolchain_type( 41 name = "toolchain", 42 visibility = ["//visibility:public"], 43 ) 44 45 bzl_library( 46 name = "def", 47 srcs = ["def.bzl"], 48 visibility = ["//visibility:public"], 49 deps = [ 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 63 bzl_library( 64 name = "deps", 65 srcs = ["deps.bzl"], 66 visibility = ["//visibility:public"], 67 deps = [ 68 "//go/private:repositories", 69 "//go/private:sdk", 70 ], 71 )