You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/go: use cached copy instead of GOTMPDIR archive #81727
The build process currently uses the package _pkg_.a from GOTMPDIR after building a package, even though a copy of the archive is already stored in GOCACHE at the end of buildObject. It can use the cached copy from GOCACHE instead.
When -work is not enabled, the GOTMPDIR copy is no longer needed and can be removed to reduce disk usage during compilation.
I have a fix for this issue and plan to open a CL for this change.
For example, my fix reduced peak disk usage during ./make.bash from 1.2 GB
to 657 MB.
Activity
gopherbot commentedon Sep 24, 2026
Change https://go.dev/cl/838145 mentions this issue:
cmd/go: use cached copy instead of GOTMPDIR archivegabyhelp commentedon Sep 24, 2026
Related Issues
Related Code Changes
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
prattmic commentedon Sep 29, 2026
cc @golang/command-line
Dinichthys commentedon Oct 9, 2026
I have a CL, which fixes this issue by using file from cache and removing temporary file. The link to the CL - https://go-review.googlesource.com/c/go/+/838145.