Pārlūkot izejas kodu

Merge pull request #9262 from rhatdan/debug

Allow developers to build docker with debuginfo included
Michael Crosby 10 gadi atpakaļ
vecāks
revīzija
93be7c0e52
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      project/make.sh

+ 5 - 1
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