Merge pull request #17544 from Microsoft/jjh/nativewindowsbuild
Windows: Native build without link errors Upstream-commit: efc7b9bbf7434aef067ad27cb6ba47f8f14ddf5d Component: engine
This commit is contained in:
@ -19,6 +19,12 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" == "windows/amd64" ] && [ "$(go env GOOS)" == "windows" ]; then
|
||||
# native compilation of Windows on Windows with golang 1.5+ needs linkmode internal
|
||||
# https://github.com/golang/go/issues/13070
|
||||
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode=internal"
|
||||
fi
|
||||
|
||||
echo "Building: $DEST/$BINARY_FULLNAME"
|
||||
go build \
|
||||
-o "$DEST/$BINARY_FULLNAME" \
|
||||
|
||||
Reference in New Issue
Block a user