osx cross
Fix CI build
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a408fb0a61
Component: cli
This commit is contained in:
@ -6,4 +6,6 @@ export BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
SHELL=/bin/bash parallel ::: \
|
||||
"$BUILDDIR/linux-cross" \
|
||||
"$BUILDDIR/windows"
|
||||
"$BUILDDIR/windows" \
|
||||
"$BUILDDIR/osx" \
|
||||
;
|
||||
|
||||
20
components/cli/scripts/build/osx
Executable file
20
components/cli/scripts/build/osx
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build an osx binary from linux
|
||||
#
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
source ./scripts/build/.variables
|
||||
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=darwin
|
||||
export GOARCH=amd64
|
||||
export CC=o64-clang
|
||||
export LDFLAGS='-linkmode external -s'
|
||||
export LDFLAGS_STATIC_DOCKER='-extld='${CC}
|
||||
|
||||
# Override TARGET
|
||||
export TARGET="build/docker-$GOOS-$GOARCH"
|
||||
|
||||
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" "${SOURCE}"
|
||||
@ -13,7 +13,7 @@ export GOOS=windows
|
||||
export GOARCH=amd64
|
||||
|
||||
# Override TARGET
|
||||
export TARGET="build/docker-windows-amd64"
|
||||
export TARGET="build/docker-$GOOS-$GOARCH"
|
||||
|
||||
# TODO: -tags pkcs11
|
||||
go build -o "${TARGET}" --ldflags "${LDFLAGS}" "${SOURCE}"
|
||||
|
||||
Reference in New Issue
Block a user