Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-linux-headers . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-cmake . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-python . /
COPY --from=stagex/core-py-setuptools . /
COPY --from=stagex/core-openssl . /
COPY --from=stagex/core-git . /
COPY --from=stagex/core-llvm . /
COPY --from=stagex/core-libffi . /
COPY --from=stagex/core-libzstd . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-samurai . /
COPY --from=stagex/core-libxml2 . /
COPY --from=stagex/core-samurai . /
ADD fetch/clang-${VERSION}.tar.xz .
WORKDIR /llvm-project-${VERSION}.src
RUN --network=none <<-EOF
set -eux
cmake \
-S clang \
-B build \
-G Ninja \
-Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/ \
-DCLANG_BUILT_STANDALONE=ON \
-DCLANG_CONFIG_FILE_SYSTEM_DIR=/etc/clang18 \
-DCLANG_ENABLE_ARCMT=ON \
-DCMAKE_INSTALL_RPATH=/usr/ \
-DCLANG_LINK_CLANG_DYLIB=ON \
-DCLANG_PLUGIN_SUPPORT=ON \
-DCLANG_VENDOR=stagex \
-DENABLE_LINKER_BUILD_ID=ON \
-DLIBCLANG_BUILD_STATIC=ON
ninja -C build clang-tblgen
ninja -C build
DESTDIR="/rootfs" cmake --install build
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /