summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJames Tucker <james@tailscale.com>2023-08-03 13:29:19 -0700
committerJames Tucker <james@tailscale.com>2023-08-03 13:34:07 -0700
commit898950968227aa757a69938c9f6c31dfe1e2e49a (patch)
tree9cce105920ac04c845d601a4cbf2b837d4d1876c
parenteb6883bb5af750420ddb572e4300a17d42e0f4cf (diff)
downloadtailscale-raggi/gotoolchain.tar.xz
tailscale-raggi/gotoolchain.zip
tool/gocross: ensure there is no mid-build toolchain changeraggi/gotoolchain
Set GOTOOLCHAIN=local as per https://go.dev/doc/toolchain to prevent dynamic switching of the toolchain during a build. I haven't reproduced directly that this contributes to symptoms we are presently diagnosing, but I am confident this is the behavior that we want. Updates #cleanup Signed-off-by: James Tucker <james@tailscale.com>
-rw-r--r--tool/gocross/autoflags.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/gocross/autoflags.go b/tool/gocross/autoflags.go
index b914759fb..9aa22e298 100644
--- a/tool/gocross/autoflags.go
+++ b/tool/gocross/autoflags.go
@@ -169,6 +169,9 @@ func autoflagsForTest(argv []string, env *Environment, goroot, nativeGOOS, nativ
env.Set("CC", "cc")
env.Set("TS_LINK_FAIL_REFLECT", boolStr(failReflect))
env.Set("GOROOT", goroot)
+ // Ensure that we use the gocross toolchain, rather than switching part way
+ // through a build. See https://go.dev/doc/toolchain.
+ env.Set("GOTOOLCHAIN", "local")
if subcommand == "env" {
return argv, env, nil