1
0
mirror of https://github.com/docker/cli.git synced 2025-08-30 12:01:10 +03:00
Files
cli/scripts/build/dynbinary
Aleksa Sarai 164e812b7a build: add -buildmode=pie
Make all dynbinary builds be position-independent (this adds both
security benefits and can help with flaky builds on POWER
architectures).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2018-07-30 19:34:01 +10:00

15 lines
336 B
Bash
Executable File

#!/usr/bin/env bash
#
# Build a dynamically linked binary for the host OS/ARCH
#
set -eu -o pipefail
source ./scripts/build/.variables
echo "Building dynamically linked $TARGET"
export CGO_ENABLED=1
go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}"
ln -sf "$(basename "${TARGET}")" build/docker