From 9170df0ad3e17c3cdb0ed983447da5c0c3908ee7 Mon Sep 17 00:00:00 2001 From: irfan sharif Date: Sat, 19 Feb 2022 23:24:52 -0500 Subject: [PATCH] bazel: document usage of custom go runtime Release justification: non-production code changes Release note: None --- WORKSPACE | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 74a3198740a3..e71ed271947c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -137,16 +137,35 @@ http_archive( load( "@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", + "go_host_sdk", + "go_local_sdk", "go_register_toolchains", "go_rules_dependencies", ) +# To point to a mirrored artifact, use: +# go_download_sdk( name = "go_sdk", urls = ["https://storage.googleapis.com/public-bazel-artifacts/go/{}"], version = "1.17.6", ) +# To point to a local SDK path, use the following instead. We'll call the +# directory into which you cloned the Go repository $GODIR[1]. You'll have to +# first run ./make.bash from $GODIR/src to pick up any custom changes. +# +# [1]: https://go.dev/doc/contribute#testing +# +# go_local_sdk( +# name = "go_sdk", +# path = "", +# ) + +# To use your whatever your local SDK is, use the following instead: +# +# go_host_sdk(name = "go_sdk") + go_rules_dependencies() go_register_toolchains(nogo = "@cockroach//:crdb_nogo")