mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Allow developers to build docker with debuginfo included
If you execute DEBUG=-g hack/make.sh dynbinary Docker will be build with the debug info making it easier to use cgdb or lightide to debug. Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
This commit is contained in:
parent
739d917d70
commit
bce9ed0e4c
1 changed files with 5 additions and 1 deletions
|
@ -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'
|
||||
EXTLDFLAGS_STATIC='-static'
|
||||
# ORIG_BUILDFLAGS is necessary for the cross target which cannot always build
|
||||
|
|
Loading…
Reference in a new issue