Merge pull request #17999 from tianon/linkmode-external
Remove "-linkmode external" Upstream-commit: 71f422435ed0ea645355f1375e2a778822416302 Component: engine
This commit is contained in:
@@ -132,11 +132,7 @@ if [ -z "$DOCKER_DEBUG" ]; then
|
||||
LDFLAGS='-w'
|
||||
fi
|
||||
|
||||
LDFLAGS_STATIC='-linkmode external'
|
||||
# Cgo -H windows is incompatible with -linkmode external.
|
||||
if [ "$(go env GOOS)" == 'windows' ]; then
|
||||
LDFLAGS_STATIC=''
|
||||
fi
|
||||
LDFLAGS_STATIC=''
|
||||
EXTLDFLAGS_STATIC='-static'
|
||||
# ORIG_BUILDFLAGS is necessary for the cross target which cannot always build
|
||||
# with options like -race.
|
||||
|
||||
@@ -14,7 +14,7 @@ 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 external/-linkmode internal} -extld=${CC}"
|
||||
export LDFLAGS_STATIC_DOCKER="$LDFLAGS_STATIC_DOCKER -linkmode internal -extld=${CC}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user