mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 22:47:30 +00:00
tool/gocross: put the synthetic GOROOTs outside of the tsgo directory
We aim to make the tsgo directories be read-only mounts on builders. But gocross was previously writing within the ~/.cache/tsgo/$HASH/ directories to make the synthetic GOROOT directories. This moves them to ~/.cache/tsgoroot/$HASH/ instead. Updates tailscale/corp#28679 Updates tailscale/corp#26717 Change-Id: I0d17730bbdce3d6374e79d49486826575d4690af Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e7f5c9a015
commit
939355f667
@@ -74,6 +74,7 @@ case "$REV" in
|
||||
echo "# Cleaning up old Go toolchain $hash" >&2
|
||||
rm -rf "$HOME/.cache/tsgo/$hash"
|
||||
rm -rf "$HOME/.cache/tsgo/$hash.extracted"
|
||||
rm -rf "$HOME/.cache/tsgoroot/$hash"
|
||||
done
|
||||
fi
|
||||
;;
|
||||
|
@@ -62,7 +62,7 @@ func getToolchain() (toolchainDir, gorootDir string, err error) {
|
||||
|
||||
cache := filepath.Join(os.Getenv("HOME"), ".cache")
|
||||
toolchainDir = filepath.Join(cache, "tsgo", rev)
|
||||
gorootDir = filepath.Join(toolchainDir, "gocross-goroot")
|
||||
gorootDir = filepath.Join(cache, "tsgoroot", rev)
|
||||
|
||||
// You might wonder why getting the toolchain also provisions and returns a
|
||||
// path suitable for use as GOROOT. Wonder no longer!
|
||||
|
Reference in New Issue
Block a user