Skip to content

Commit 0da92cd

Browse files
authored
go_context: set GOTOOLCHAIN to 'local' (#3660)
Enforce usage of the current toolchain and avoid downloading new toolchains during build.
1 parent edf5b64 commit 0da92cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

go/private/context.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,12 @@ def go_context(ctx, attr = None):
446446
# Explicitly clear this environment variable to ensure that doesn't
447447
# happen. See #2291 for more information.
448448
"GOPATH": "",
449+
450+
# Since v1.21.0, set GOTOOLCHAIN to "local" to use the current toolchain
451+
# and avoid downloading other toolchains.
452+
#
453+
# See https://go.dev/doc/toolchain for more info.
454+
"GOTOOLCHAIN": "local",
449455
}
450456

451457
# The level of support is determined by the platform constraints in

0 commit comments

Comments
 (0)