mirror of
https://github.com/mstorsjo/llvm-mingw
synced 2026-06-21 14:01:00 +00:00
cb92de78e7
Since LLVM 21.x, the upstream support for ARM64EC in LLD and compiler-rt is complete enough for us to be able to build it.
32 lines
1.2 KiB
Docker
32 lines
1.2 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/*
|
|
|
|
|
|
RUN git config --global user.name "LLVM MinGW" && \
|
|
git config --global user.email root@localhost
|
|
|
|
WORKDIR /build
|
|
|
|
ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw
|
|
|
|
ARG TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64 arm64ec"
|
|
|
|
# Copy prebuilt toolchains for the current architecture.
|
|
# Test executing a binary, to make sure that it works (i.e. it is not built
|
|
# requiring a newer version of glibc or libstdc++ than what is available in
|
|
# this container).
|
|
RUN --mount=type=bind,source=toolchain,target=/toolchain \
|
|
mkdir -p $TOOLCHAIN_PREFIX && ARCH=$(uname -m) && \
|
|
tar xf /toolchain/linux-ucrt-$ARCH-toolchain/llvm-mingw-*-$ARCH.tar.xz --strip-components 1 -C $TOOLCHAIN_PREFIX && \
|
|
ANY_ARCH=$(echo $TOOLCHAIN_ARCHS | awk '{print $1}') && \
|
|
$TOOLCHAIN_PREFIX/bin/$ANY_ARCH-w64-mingw32-clang --version
|
|
|
|
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
|