This commit adds support for the GOCACHE environment variable in the Go
compiler implementation. The cache is copied from a read-only source
location to a writeable temporary directory during compilation.
Key changes:
- Auto-detect GOROOT from compiler executable path if not explicitly set
- Store source cache path (GOROOT/../cache) during initialization
- Override runCompiler() to set up a writeable cache before compilation
- Copy existing cache contents to temp directory for better performance
- Set GOCACHE environment variable to the temporary writeable location
- Handle errors gracefully, continuing compilation even if cache setup fails
The implementation ensures that Go compilations always have access to a
writeable cache directory, which improves compilation performance through
build artifact caching while maintaining compatibility with CE's sandboxed
compilation environment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>