Skip to content

Commit

Permalink
Merge pull request #98 from dpiddy/go15-linker-x-equals
Browse files Browse the repository at this point in the history
use new linker -X option format for go1.5
  • Loading branch information
Edward Muller committed Oct 6, 2015
2 parents 5309522 + 2fd7784 commit a0a82e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,15 @@ fi
FLAGS=(-tags heroku)
if [ -n "$GO_LINKER_SYMBOL" -a -n "$GO_LINKER_VALUE" ]
then
FLAGS=(${FLAGS[@]} -ldflags "-X $GO_LINKER_SYMBOL $GO_LINKER_VALUE")
case $ver in
go1.5*)
xval="$GO_LINKER_SYMBOL=$GO_LINKER_VALUE"
;;
*)
xval="$GO_LINKER_SYMBOL $GO_LINKER_VALUE"
;;
esac
FLAGS=(${FLAGS[@]} -ldflags "-X $xval")
fi

unset GIT_DIR # unset git dir or it will mess with goinstall
Expand Down

0 comments on commit a0a82e1

Please sign in to comment.