build: match the builder comment to measured numbers

Measured on an arm64 host: go build -a for linux/amd64 took 61s under
QEMU versus 15s natively, so "several times slower" rather than an order
of magnitude.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Benjamin PrachtandClaude Opus 5.5 committed 2026-10-27 10:34:34 -07:00
1 parent 4a958aed60
commit 32c4bd80ce
1 file changed
+2 -2
+2 -2
View File
@@ -21,8 +21,8 @@
# build below already cross-compiles explicitly (CGO_ENABLED=0, GOOS=linux,
# GOARCH=$TARGETARCH), so the toolchain never needs to be the target's arch —
# and without this line a cross-arch build runs the whole Go compilation under
# QEMU emulation, which is roughly an order of magnitude slower for an identical
# binary. Only the final stage stays on $TARGETPLATFORM, where it belongs.
# QEMU emulation, which is several times slower for an identical binary. Only
# the final stage stays on $TARGETPLATFORM, where it belongs.
FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine3.24@sha256:f2c872bcee949b7be9c490efd02b48a8a2fbf947cdf533f1c58525ec9d8170fd AS builder
ARG TARGETPLATFORM