From 9672afa3391119b3b06d87735041168b01b7f1da Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Tue, 26 Jan 2016 16:17:05 -0500 Subject: [PATCH] Add `DOCKER_BUILD_GOGC` to tweak GOGC for compile Signed-off-by: Brian Goff --- Makefile | 2 ++ hack/make/binary | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 5168cbe90b..187a7247d5 100644 --- a/Makefile +++ b/Makefile @@ -31,12 +31,14 @@ export DOCKERFILE # `docs/sources/contributing/devenvironment.md ` and `project/PACKAGERS.md` have some limited documentation of some of these DOCKER_ENVS := \ -e BUILDFLAGS \ + -e DOCKER_BUILD_GOGC \ -e DOCKER_BUILD_PKGS \ -e DOCKER_CLIENTONLY \ -e DOCKER_DEBUG \ -e DOCKER_EXPERIMENTAL \ -e DOCKERFILE \ -e DOCKER_GRAPHDRIVER \ + -e DOCKER_INCREMENTAL_BINARY \ -e DOCKER_REMAP_ROOT \ -e DOCKER_STORAGE_OPTS \ -e DOCKER_USERLANDPROXY \ diff --git a/hack/make/binary b/hack/make/binary index 0c6058a5ef..6e9fbb478a 100644 --- a/hack/make/binary +++ b/hack/make/binary @@ -8,6 +8,8 @@ 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! case "$(go env GOOS)/$(go env GOARCH)" in