mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 05:01:28 +00:00
Use code generation to set IAMSTATIC instead of -X
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
This commit is contained in:
@@ -3,6 +3,17 @@ set -e
|
||||
|
||||
DEST=$1
|
||||
|
||||
: ${IAMSTATIC:=true}
|
||||
|
||||
cat > dockerversion/static.go <<EOF
|
||||
// AUTOGENERATED FILE; see hack/make/binary and hack/make/dynbinary
|
||||
package dockerversion
|
||||
|
||||
func init() {
|
||||
IAMSTATIC = $IAMSTATIC
|
||||
}
|
||||
EOF
|
||||
|
||||
go build \
|
||||
-o "$DEST/docker-$VERSION" \
|
||||
"${BUILDFLAGS[@]}" \
|
||||
|
||||
Reference in New Issue
Block a user