diff --git a/project/make.sh b/project/make.sh index 0bcb1e1a6c..2b3a530ea1 100755 --- a/project/make.sh +++ b/project/make.sh @@ -96,10 +96,14 @@ fi # Use these flags when compiling the tests and final binary LDFLAGS=' - -w -X '$DOCKER_PKG'/dockerversion.GITCOMMIT "'$GITCOMMIT'" -X '$DOCKER_PKG'/dockerversion.VERSION "'$VERSION'" ' + +if [ -z "$DEBUG" ]; then + LDFLAGS="-w $LDFLAGS" +fi + LDFLAGS_STATIC='-linkmode external' # Cgo -H windows is incompatible with -linkmode external. if [ "$(go env GOOS)" == 'windows' ]; then