finally, use code generation for INITSHA1 & INITPATH too
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org> Upstream-commit: c7c620dd9fce0e7b437ee185c7a58341f3b8e3aa Component: engine
This commit is contained in:
@ -47,7 +47,16 @@ fi
|
||||
# exported so that "dyntest" can easily access it later without recalculating it
|
||||
|
||||
(
|
||||
export LDFLAGS_STATIC_DOCKER="-X $DOCKER_PKG/dockerversion.INITSHA1 \"$DOCKER_INITSHA1\" -X $DOCKER_PKG/dockerversion.INITPATH \"$DOCKER_INITPATH\""
|
||||
export LDFLAGS_STATIC_DOCKER=""
|
||||
cat > dockerversion/init.go <<EOF
|
||||
// AUTOGENERATED FILE; see hack/make/dynbinary, hack/make/dyntest-integration and dyntest-unit
|
||||
package dockerversion
|
||||
|
||||
func init() {
|
||||
INITSHA1 = "$DOCKER_INITSHA1"
|
||||
INITPATH = "$DOCKER_INITPATH"
|
||||
}
|
||||
EOF
|
||||
export IAMSTATIC=false
|
||||
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
|
||||
source "$(dirname "$BASH_SOURCE")/binary"
|
||||
|
||||
Reference in New Issue
Block a user