mirror of https://github.com/docker/cli.git
Dockerfile: prefer ld for cross-compiling arm64 in bullseye
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
9fe6cb4b39
commit
d45030380d
|
@ -55,6 +55,8 @@ ARG VERSION
|
||||||
# PACKAGER_NAME sets the company that produced the windows binary
|
# PACKAGER_NAME sets the company that produced the windows binary
|
||||||
ARG PACKAGER_NAME
|
ARG PACKAGER_NAME
|
||||||
COPY --from=goversioninfo /out/goversioninfo /usr/bin/goversioninfo
|
COPY --from=goversioninfo /out/goversioninfo /usr/bin/goversioninfo
|
||||||
|
# in bullseye arm64 target does not link with lld so configure it to use ld instead
|
||||||
|
RUN [ ! -f /etc/alpine-release ] && xx-info is-cross && [ "$(xx-info arch)" = "arm64" ] && XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple || true
|
||||||
RUN --mount=type=bind,target=.,ro \
|
RUN --mount=type=bind,target=.,ro \
|
||||||
--mount=type=cache,target=/root/.cache \
|
--mount=type=cache,target=/root/.cache \
|
||||||
--mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk \
|
--mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk \
|
||||||
|
|
Loading…
Reference in New Issue