mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Remove linkmode internal hack
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
d299bbfcc6
commit
6ca5a2c476
3 changed files with 11 additions and 10 deletions
|
@ -234,10 +234,11 @@ RUN set -x \
|
|||
&& rm -rf "$GOPATH"
|
||||
|
||||
# Build/install the tool for embedding resources in Windows binaries
|
||||
ENV RSRC_VERSION v2
|
||||
ENV RSRC_COMMIT ba14da1f827188454a4591717fff29999010887f
|
||||
RUN set -x \
|
||||
&& export GOPATH="$(mktemp -d)" \
|
||||
&& git clone --depth 1 -b "$RSRC_VERSION" https://github.com/akavel/rsrc.git "$GOPATH/src/github.com/akavel/rsrc" \
|
||||
&& git clone https://github.com/akavel/rsrc.git "$GOPATH/src/github.com/akavel/rsrc" \
|
||||
&& (cd "$GOPATH/src/github.com/akavel/rsrc" && git checkout -q "$RSRC_COMMIT") \
|
||||
&& go build -v -o /usr/local/bin/rsrc github.com/akavel/rsrc \
|
||||
&& rm -rf "$GOPATH"
|
||||
|
||||
|
|
|
@ -55,5 +55,12 @@ if [ "$(go env GOOS)" = 'windows' ]; then
|
|||
rsrc \
|
||||
-manifest hack/make/.resources-windows/docker.exe.manifest \
|
||||
-ico hack/make/.resources-windows/docker.ico \
|
||||
-o autogen/winresources/rsrc.syso > /dev/null
|
||||
-arch "amd64" \
|
||||
-o autogen/winresources/rsrc_amd64.syso > /dev/null
|
||||
|
||||
rsrc \
|
||||
-manifest hack/make/.resources-windows/docker.exe.manifest \
|
||||
-ico hack/make/.resources-windows/docker.ico \
|
||||
-arch "386" \
|
||||
-o autogen/winresources/rsrc_386.syso > /dev/null
|
||||
fi
|
||||
|
|
|
@ -14,17 +14,10 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC
|
|||
windows/amd64)
|
||||
export CC=x86_64-w64-mingw32-gcc
|
||||
export CGO_ENABLED=1
|
||||
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode internal -extld=${CC}"
|
||||
;;
|
||||
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
|
||||
|
||||
if [ "$(go env GOOS)" == "linux" ] ; then
|
||||
case "$(go env GOARCH)" in
|
||||
arm*|386)
|
||||
|
|
Loading…
Reference in a new issue