Skip to content
This repository was archived by the owner on Mar 14, 2026. It is now read-only.

Commit a250660

Browse files
committed
Add GOCACHEPROG binary and pre-build stdlib cache for Go 1.25.5
- Build a new cacheprog binary to enable read-only cache access. - Pre-build the standard library cache in a dedicated GOCACHE directory. - Update compile script to use GOCACHEPROG for improved caching during builds.
1 parent b087c41 commit a250660

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

packages/go/1.25.5/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
curl -LO https://go.dev/dl/go1.25.5.linux-amd64.tar.gz
33
tar -xzf go1.25.5.linux-amd64.tar.gz
44
rm go1.25.5.linux-amd64.tar.gz
5+
6+
# Build GOCACHEPROG binary for read-only cache access
7+
CGO_ENABLED=0 ./go/bin/go build -o cacheprog cacheprog.go
8+
9+
# Pre-build standard library cache
10+
export GOCACHE=$PWD/cache
11+
mkdir -p $GOCACHE
12+
CGO_ENABLED=0 ./go/bin/go build std

packages/go/1.25.5/compile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22

33
mv $1 $1.go
4-
GOCACHE=$PWD go build -o binary *.go
4+
export GOCACHEPROG="/piston/packages/go/1.25.5/cacheprog /piston/packages/go/1.25.5/cache"
5+
CGO_ENABLED=0 go build -o binary *.go
56
chmod +x binary

0 commit comments

Comments
 (0)