fix: use AS instead of as and switch to newer clang and llvm

This commit is contained in:
Anton Livaja 2024-08-14 23:17:54 -04:00
parent a9e37355e2
commit 157fb936b3
No known key found for this signature in database
GPG key ID: 44A86CFF1FDF0E85
5 changed files with 13 additions and 13 deletions

View file

@ -1,13 +1,13 @@
FROM scratch as base
FROM scratch AS base
ENV VERSION=16.0.6
ENV SRC_HASH=ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e
ENV SRC_FILE=llvm-project-${VERSION}.src.tar.xz
ENV SRC_SITE=https://github.com/llvm/llvm-project/releases/download/llvm-org-${VERSION}/${SRC_FILE}
FROM base as fetch
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/cmake . /
@ -41,8 +41,8 @@ RUN --network=none <<-EOF
cmake --build build
EOF
FROM build as install
FROM build AS install
RUN --network=none DESTDIR="/rootfs" cmake --install build
FROM stagex/filesystem as package
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -1,13 +1,13 @@
FROM scratch as base
FROM scratch AS base
ENV VERSION=16.0.6
ENV SRC_FILE=llvm-project-${VERSION}.src.tar.xz
ENV SRC_SITE=https://github.com/llvm/llvm-project/releases/download/llvmorg-${VERSION}/${SRC_FILE}
ENV SRC_HASH=ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e
FROM base as fetch
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/cmake . /
@ -61,7 +61,7 @@ RUN --network=none <<-EOF
python3 llvm/utils/lit/setup.py build
EOF
FROM build as install
FROM build AS install
RUN --network=none <<-EOF
set -eux
DESTDIR="/rootfs" cmake --install build
@ -69,5 +69,5 @@ RUN --network=none <<-EOF
ln -s lit /rootfs/usr/bin/llvm-lit
EOF
FROM stagex/filesystem as package
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -20,7 +20,7 @@ WORKDIR openpgp-card-tools
RUN cargo fetch
FROM fetch AS build
COPY --from=stagex/clang16 . /
COPY --from=stagex/clang . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/gmp . /
COPY --from=stagex/nettle . /

View file

@ -17,7 +17,7 @@ COPY --from=stagex/icu . /
COPY --from=stagex/llvm . /
COPY --from=stagex/zlib . /
COPY --from=stagex/gcc . /
COPY --from=stagex/clang16 . /
COPY --from=stagex/clang . /
COPY --from=stagex/perl . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/bison . /

View file

@ -11,7 +11,7 @@ COPY static-glibc.patch .
FROM fetch AS build
COPY --from=stagex/binutils . /
COPY --from=stagex/busybox . /
COPY --from=stagex/clang16 . /
COPY --from=stagex/clang . /
COPY --from=stagex/cmake . /
COPY --from=stagex/gcc . /
COPY --from=stagex/libzstd . /