Skip to content

Commit

Permalink
go_context: set GOTOOLCHAIN to 'local' (#3660)
Browse files Browse the repository at this point in the history
Enforce usage of the current toolchain and avoid downloading new
toolchains during build.
  • Loading branch information
sluongng committed Aug 15, 2023
1 parent edf5b64 commit 0da92cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/private/context.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ def go_context(ctx, attr = None):
# Explicitly clear this environment variable to ensure that doesn't
# happen. See #2291 for more information.
"GOPATH": "",

# Since v1.21.0, set GOTOOLCHAIN to "local" to use the current toolchain
# and avoid downloading other toolchains.
#
# See https://go.dev/doc/toolchain for more info.
"GOTOOLCHAIN": "local",
}

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

0 comments on commit 0da92cd

Please sign in to comment.