Files
llvm-mingw/Dockerfile.system-clang
T
Martin Storsjö 4306cadf97 Docker.system-clang: Update the system-clang testcase to Ubuntu 24.04
Update to using clang-18 from the host system; version 16 or
newer is required for the implicitly selected config files
(which are used since 866d47cced);
that version changed whether the target triples are normalized
before locating config files.

This allows building runtimes with the current versions of LLVM
19.x, rather than needing to select an older version.
2025-01-07 23:15:13 +02:00

45 lines
1.6 KiB
Docker

FROM ubuntu:24.04
RUN apt-get update -qq && \
DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \
git wget bzip2 file unzip libtool pkg-config cmake build-essential \
automake nasm gettext autopoint vim-tiny python3 \
ninja-build ca-certificates curl less zip && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# Separate step for system-clang; the RUN line above is similar to other dockerfiles.
RUN apt-get update -qq && \
apt-get install -qqy clang-18 lld-18 llvm-18 && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
RUN git config --global user.name "LLVM MinGW" && \
git config --global user.email root@localhost
WORKDIR /build
ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw
# build-compiler-rt.sh assumes that sanitizers can be built for all architectures.
# Sanitizers can be built for aarch64 since LLVM 14 and for armv7 since LLVM 19.
# For simplicity, just skip building for armv7 when building an older version.
ARG TOOLCHAIN_ARCHS="i686 x86_64 aarch64"
ARG DEFAULT_CRT=ucrt
ARG CFGUARD_ARGS=--enable-cfguard
COPY build-all.sh build-llvm.sh install-wrappers.sh build-mingw-w64.sh build-mingw-w64-tools.sh build-compiler-rt.sh build-libcxx.sh build-mingw-w64-libraries.sh build-openmp.sh ./
COPY wrappers/*.sh wrappers/*.c wrappers/*.h wrappers/*.cfg ./wrappers/
RUN ./build-all.sh $TOOLCHAIN_PREFIX --host-clang=clang-18 && \
rm -rf /build/*
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
# Test the installation
COPY test/*.c test/*.cpp test/*.h test/*.idl test/*.rc test/Makefile ./test/
COPY run-tests.sh ./
RUN RUN_I686=false RUN_X86_64=false ./run-tests.sh $TOOLCHAIN_PREFIX