From d6334fdb02e787c6e15c66e4d53856c814ab7050 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:15:18 +0100 Subject: [PATCH] ld: use heredocs and ADD to clone in dockerfile Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/ld/Dockerfile | 257 ++++++++++++++++++++++++++++++---------------- 1 file changed, 166 insertions(+), 91 deletions(-) diff --git a/src/ld/Dockerfile b/src/ld/Dockerfile index 0c8a7b2..d1e2118 100644 --- a/src/ld/Dockerfile +++ b/src/ld/Dockerfile @@ -1,4 +1,4 @@ -#syntax=docker/dockerfile:1.8 +#syntax=docker/dockerfile:1 #check=error=true ARG ALPINE_VERSION=3.21 @@ -16,41 +16,54 @@ RUN apk add --no-cache git clang lld cmake make python3 bash COPY --link --from=xx / / ARG LIBTAPI_VERSION WORKDIR /work -RUN git clone https://github.com/tpoechtrager/apple-libtapi --depth 1 -b ${LIBTAPI_VERSION} +ADD "https://github.com/tpoechtrager/apple-libtapi.git#${LIBTAPI_VERSION}" apple-libtapi WORKDIR apple-libtapi RUN --mount=target=/tmp/libtapi-cmake-args.patch,source=libtapi-cmake-args.patch \ git apply /tmp/libtapi-cmake-args.patch RUN apk add --no-cache gcc g++ -RUN NOMAKE=1 CMAKE_EXTRA_ARGS="$(xx-clang --print-cmake-defines) -DCMAKE_CXX_FLAGS=-D_LARGEFILE64_SOURCE" ./build.sh && \ - cd build && \ - make -j $(nproc) clang-tblgen llvm-tblgen && \ - cp -a bin/clang-tblgen bin/llvm-tblgen /usr/bin/ && \ - cd .. && rm -rf build +RUN <