From 81c170a6965c2794d79b2570fd487647b923d139 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 17 Dec 2025 17:57:50 +0100 Subject: [PATCH] Makefile: remove DOCKER_BUILD_GOGC This option was added in 9672afa3391119b3b06d87735041168b01b7f1da in 2016, at which time tweaking GOGC showed a significant difference when building the binary (`1m14.221s` vs `0m49.929s`). Testing this Today doesn't show a real difference; With GOGC=1000: rm -rf bundles/ time hack/make.sh binary real 0m15.303s user 0m26.285s sys 0m6.383s real 0m4.931s user 0m3.103s sys 0m1.670s real 0m5.693s user 0m3.827s sys 0m2.384s Without GOGC set; real 0m5.012s user 0m3.689s sys 0m1.549s real 0m5.298s user 0m3.997s sys 0m1.695s real 0m4.899s user 0m3.579s sys 0m1.423s Signed-off-by: Sebastiaan van Stijn --- Makefile | 1 - docs/contributing/set-up-dev-env.md | 2 +- hack/make/.binary | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0919b6af6e..f87bdbe141 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,6 @@ DOCKER_ENVS := \ -e BUILDFLAGS \ -e KEEPBUNDLE \ -e DOCKER_BUILD_ARGS \ - -e DOCKER_BUILD_GOGC \ -e DOCKER_BUILDKIT \ -e DOCKER_CLI_PATH \ -e DOCKERCLI_VERSION \ diff --git a/docs/contributing/set-up-dev-env.md b/docs/contributing/set-up-dev-env.md index 482af0fdf3..eb5e93ce42 100644 --- a/docs/contributing/set-up-dev-env.md +++ b/docs/contributing/set-up-dev-env.md @@ -129,7 +129,7 @@ can take over 15 minutes to complete. ```none Successfully built 3d872560918e - docker run --rm -i --privileged -e BUILDFLAGS -e KEEPBUNDLE -e DOCKER_BUILD_GOGC -e DOCKER_CLIENTONLY -e DOCKER_DEBUG -e DOCKER_EXPERIMENTAL -e DOCKER_GITCOMMIT -e DOCKER_GRAPHDRIVER=vfs -e DOCKER_REMAP_ROOT -e DOCKER_STORAGE_OPTS -e DOCKER_USERLANDPROXY -e TESTDIRS -e TESTFLAGS -e TIMEOUT -v "home/ubuntu/repos/docker/bundles:/go/src/github.com/docker/docker/bundles" -t "docker-dev" bash + docker run --rm -i --privileged -e BUILDFLAGS -e KEEPBUNDLE -e DOCKER_CLIENTONLY -e DOCKER_DEBUG -e DOCKER_EXPERIMENTAL -e DOCKER_GITCOMMIT -e DOCKER_GRAPHDRIVER=vfs -e DOCKER_REMAP_ROOT -e DOCKER_STORAGE_OPTS -e DOCKER_USERLANDPROXY -e TESTDIRS -e TESTFLAGS -e TIMEOUT -v "home/ubuntu/repos/docker/bundles:/go/src/github.com/docker/docker/bundles" -t "docker-dev" bash # ``` diff --git a/hack/make/.binary b/hack/make/.binary index 0d5c931c14..a6c3e35091 100644 --- a/hack/make/.binary +++ b/hack/make/.binary @@ -14,8 +14,6 @@ BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION" source "${MAKEDIR}/.go-autogen" ( - export GOGC=${DOCKER_BUILD_GOGC:-1000} - if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" ]; then # must be cross-compiling! if [ "$(go env GOOS)/$(go env GOARCH)" = "linux/arm" ]; then