build.bash: Escape LDFLAGS before passing them to 'go build'.

This ensures that ./build.bash still works when the LDFLAGS environment
variable contains multiple options, e.g., LDFLAGS="-lpthread -lm". The
correct way of passing multiple options is discussed here:

For some unknown reason, the method only works when -extldflags is the
last argument - is this a bug in Go?
This commit is contained in:
Sebastian Lackner 2018-12-26 21:45:10 +01:00 committed by rfjakob
parent 3cba378ad5
commit 2a010263f6
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ GO_LDFLAGS="-X main.GitVersion=$GITVERSION -X main.GitVersionFuse=$GITVERSIONFUS
# If LDFLAGS is set, add it as "-extldflags".
if [[ -n ${LDFLAGS:-} ]] ; then
# Actual "go build" call