dockerfile: llvm needed on debian for cross comp
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -86,6 +86,12 @@ if [ "$CGO_ENABLED" = "1" ] && [ "$GO_LINKMODE" = "static" ]; then
|
||||
GO_BUILDTAGS="$GO_BUILDTAGS osusergo"
|
||||
fi
|
||||
if [ -n "$GO_STRIP" ]; then
|
||||
# if stripping enabled and building with llvm < 12 against darwin/amd64
|
||||
# platform, it will fail with:
|
||||
# # github.com/docker/cli/cmd/docker
|
||||
# /usr/local/go/pkg/tool/linux_amd64/link: /usr/local/go/pkg/tool/linux_amd64/link: running strip failed: exit status 1
|
||||
# llvm-strip: error: unsupported load command (cmd=0x5)
|
||||
# more info: https://github.com/docker/cli/pull/3717
|
||||
GO_LDFLAGS="$GO_LDFLAGS -s -w"
|
||||
fi
|
||||
export GO_LDFLAGS="$GO_LDFLAGS" # https://github.com/koalaman/shellcheck/issues/2064
|
||||
|
||||
Reference in New Issue
Block a user