Merge remote-tracking branch 'origin/anton/llvm-18' into staging
This commit is contained in:
commit
14dd3059e1
12 changed files with 179 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
FROM scratch AS base
|
||||
ENV VERSION=16.0.6
|
||||
ENV SRC_HASH=ce5e71081d17ce9e86d7cbcfa28c4b04b9300f8fb7e78422b1feb6bc52c3028e
|
||||
ENV VERSION=18.1.8
|
||||
ENV SRC_HASH=0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a
|
||||
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}
|
||||
|
||||
|
|
48
packages/clang16/Containerfile
Normal file
48
packages/clang16/Containerfile
Normal file
|
@ -0,0 +1,48 @@
|
|||
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
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch AS build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/ninja . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/python . /
|
||||
COPY --from=stagex/py-setuptools . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/zlib . /
|
||||
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
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/ \
|
||||
-DCMAKE_INSTALL_RPATH=/usr/ \
|
||||
-DCLANG_BUILT_STANDALONE=ON \
|
||||
-DCLANG_LINK_CLANG_DYLIB=ON \
|
||||
-DCLANG_PLUGIN_SUPPORT=ON \
|
||||
-DCLANG_VENDOR=stagex \
|
||||
-DLIBCLANG_BUILD_STATIC=ON
|
||||
cmake --build build
|
||||
EOF
|
||||
|
||||
FROM build AS install
|
||||
RUN --network=none DESTDIR="/rootfs" cmake --install build
|
||||
|
||||
FROM stagex/filesystem AS package
|
||||
COPY --from=install /rootfs/. /
|
|
@ -13,7 +13,7 @@ COPY --from=stagex/zlib . /
|
|||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/git . /
|
||||
|
|
|
@ -10,7 +10,7 @@ COPY --from=stagex/rust . /
|
|||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/libunwind . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/zlib . /
|
||||
|
@ -24,7 +24,7 @@ ADD <<-EOF /.cargo/config.toml
|
|||
RUN cargo fetch
|
||||
|
||||
FROM fetch AS build
|
||||
COPY --from=stagex/clang . /
|
||||
COPY --from=stagex/clang16 . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/gmp . /
|
||||
COPY --from=stagex/nettle . /
|
||||
|
|
|
@ -18,7 +18,7 @@ COPY --from=stagex/python . /
|
|||
COPY --from=stagex/py-setuptools . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/zlib . /
|
||||
# HACK: figure out why gcc package puts these in the wrong path at install time
|
||||
COPY --from=stagex/gcc /usr/lib64/* /usr/lib/
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
FROM scratch AS base
|
||||
ENV VERSION=16.0.6
|
||||
ENV VERSION=18.1.8
|
||||
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
|
||||
|
||||
ENV SRC_HASH=0b58557a6d32ceee97c8d533a59b9212d87e0fc4d2833924eb6c611247db2f2a
|
||||
FROM base AS fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch AS build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/ninja . /
|
||||
|
@ -21,12 +21,14 @@ COPY --from=stagex/openssl . /
|
|||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR llvm-project-${VERSION}.src
|
||||
ADD *.patch .
|
||||
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
python -c "import setuptools; print(setuptools.__version__)"
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-Wno-dev -S llvm \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/ \
|
||||
|
@ -54,6 +56,7 @@ RUN --network=none <<-EOF
|
|||
-DLLVM_ENABLE_ZSTD=OFF \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INSTALL_GTEST=ON \
|
||||
-DLLVM_INSTALL_UTILS=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DLLVM_USE_PERF=ON
|
||||
|
|
73
packages/llvm16/Containerfile
Normal file
73
packages/llvm16/Containerfile
Normal file
|
@ -0,0 +1,73 @@
|
|||
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
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch AS build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/ninja . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/python . /
|
||||
COPY --from=stagex/py-setuptools . /
|
||||
COPY --from=stagex/zlib . /
|
||||
COPY --from=stagex/openssl . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR llvm-project-${VERSION}.src
|
||||
ADD *.patch .
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
python -c "import setuptools; print(setuptools.__version__)"
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-Wno-dev -S llvm \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/ \
|
||||
-DCMAKE_INSTALL_RPATH=/usr/ \
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-linux-musl" \
|
||||
-DLLVM_HOST_TRIPLE="x86_64-linux-musl" \
|
||||
-DLLVM_APPEND_VC_REV=OFF \
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
-DLLVM_BUILD_DOCS=OFF \
|
||||
-DLLVM_BUILD_EXAMPLES=OFF \
|
||||
-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||
-DLLVM_BUILD_TESTS=ON \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_ENABLE_DUMP=ON \
|
||||
-DLLVM_ENABLE_EH=ON \
|
||||
-DLLVM_ENABLE_FFI=OFF \
|
||||
-DLLVM_ENABLE_LIBCXX=OFF \
|
||||
-DLLVM_ENABLE_LIBEDIT=OFF \
|
||||
-DLLVM_ENABLE_PIC=ON \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_ENABLE_SPHINX=OFF \
|
||||
-DLLVM_ENABLE_TERMINFO=ON \
|
||||
-DLLVM_ENABLE_ZLIB=FORCE_ON \
|
||||
-DLLVM_ENABLE_ZSTD=OFF \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INSTALL_UTILS=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DLLVM_USE_PERF=ON
|
||||
cmake --build build
|
||||
python3 llvm/utils/lit/setup.py build
|
||||
EOF
|
||||
|
||||
FROM build AS install
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
DESTDIR="/rootfs" cmake --install build
|
||||
python3 llvm/utils/lit/setup.py install --root="/rootfs"
|
||||
ln -s lit /rootfs/usr/bin/llvm-lit
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem AS package
|
||||
COPY --from=install /rootfs/. /
|
|
@ -10,7 +10,7 @@ COPY --from=stagex/rust . /
|
|||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/libunwind . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/zlib . /
|
||||
|
@ -20,7 +20,7 @@ WORKDIR openpgp-card-tools
|
|||
RUN cargo fetch
|
||||
|
||||
FROM fetch AS build
|
||||
COPY --from=stagex/clang . /
|
||||
COPY --from=stagex/clang16 . /
|
||||
COPY --from=stagex/linux-headers . /
|
||||
COPY --from=stagex/gmp . /
|
||||
COPY --from=stagex/nettle . /
|
||||
|
|
|
@ -13,7 +13,7 @@ COPY --from=stagex/musl . /
|
|||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/libunwind . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/ca-certificates . /
|
||||
|
|
|
@ -177,7 +177,7 @@ RUN sh build.sh 1.67.0 1.66.0
|
|||
RUN sh build.sh 1.68.0 1.67.0
|
||||
|
||||
FROM build-script AS build
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=build-llvm13 /rust-1.68.0 /rust-1.68.0
|
||||
COPY --from=stagex/llvm13 /usr/lib/libLLVM-13.so /usr/lib/
|
||||
RUN sh build.sh 1.69.0 1.68.0
|
||||
|
|
|
@ -11,12 +11,12 @@ COPY static-glibc.patch .
|
|||
FROM fetch AS build
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/clang . /
|
||||
COPY --from=stagex/clang16 . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/libzstd . /
|
||||
COPY --from=stagex/lld . /
|
||||
COPY --from=stagex/llvm . /
|
||||
COPY --from=stagex/llvm16 . /
|
||||
COPY --from=stagex/make . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/openssl . /
|
||||
|
|
|
@ -247,6 +247,24 @@ out/clang/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,clang)
|
||||
|
||||
.PHONY: clang16
|
||||
clang16: out/clang16/index.json
|
||||
out/clang16/index.json: \
|
||||
packages/clang16/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/cmake/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/llvm16/index.json \
|
||||
out/musl/index.json \
|
||||
out/ninja/index.json \
|
||||
out/openssl/index.json \
|
||||
out/py-setuptools/index.json \
|
||||
out/python/index.json \
|
||||
out/zlib/index.json
|
||||
$(call build,clang16)
|
||||
|
||||
.PHONY: cmake
|
||||
cmake: out/cmake/index.json
|
||||
out/cmake/index.json: \
|
||||
|
@ -795,7 +813,7 @@ out/keyfork/index.json: \
|
|||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/ca-certificates/index.json \
|
||||
out/clang/index.json \
|
||||
out/clang16/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/gmp/index.json \
|
||||
|
@ -1193,6 +1211,7 @@ out/llvm/index.json: \
|
|||
out/cmake/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/linux-headers/index.json \
|
||||
out/musl/index.json \
|
||||
out/ninja/index.json \
|
||||
out/openssl/index.json \
|
||||
|
@ -1218,6 +1237,23 @@ out/llvm13/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,llvm13)
|
||||
|
||||
.PHONY: llvm16
|
||||
llvm16: out/llvm16/index.json
|
||||
out/llvm16/index.json: \
|
||||
packages/llvm16/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/cmake/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/musl/index.json \
|
||||
out/ninja/index.json \
|
||||
out/openssl/index.json \
|
||||
out/py-setuptools/index.json \
|
||||
out/python/index.json \
|
||||
out/zlib/index.json
|
||||
$(call build,llvm16)
|
||||
|
||||
.PHONY: lua
|
||||
lua: out/lua/index.json
|
||||
out/lua/index.json: \
|
||||
|
@ -1512,6 +1548,7 @@ out/openssh/index.json: \
|
|||
out/musl/index.json \
|
||||
out/musl-fts/index.json \
|
||||
out/musl-obstack/index.json \
|
||||
out/openssl/index.json \
|
||||
out/perl/index.json \
|
||||
out/pkgconf/index.json \
|
||||
out/zlib/index.json
|
||||
|
@ -1858,7 +1895,7 @@ out/py-cryptography/index.json: \
|
|||
out/gcc/index.json \
|
||||
out/libffi/index.json \
|
||||
out/libunwind/index.json \
|
||||
out/llvm/index.json \
|
||||
out/llvm16/index.json \
|
||||
out/musl/index.json \
|
||||
out/openssl/index.json \
|
||||
out/pkgconf/index.json \
|
||||
|
@ -2234,8 +2271,8 @@ out/rust/index.json: \
|
|||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/libunwind/index.json \
|
||||
out/llvm/index.json \
|
||||
out/llvm13/index.json \
|
||||
out/llvm16/index.json \
|
||||
out/make/index.json \
|
||||
out/musl/index.json \
|
||||
out/openssl/index.json \
|
||||
|
|
Loading…
Reference in a new issue