Skip to content

Commit

Permalink
make Dockerfile.windows self-contained
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWitch committed Dec 16, 2022
1 parent 9f4fea3 commit 4cf14ee
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions misc/ci/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

LABEL maintainer="Alice D. <[email protected]>"

ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw
ENV TOOLCHAIN_VERSION="20220906"
ARG TOOLCHAIN_ARCHS="i686 x86_64"
ARG DEFAULT_CRT=ucrt

RUN apt-get update -qq && \
apt-get upgrade -qqy && \
apt-get dist-upgrade -qqy && \
apt-get install -qqy --no-install-recommends \
git wget bzip2 file unzip libtool pkg-config cmake build-essential \
automake yasm gettext autopoint vim-tiny python3 python3-distutils \
ninja-build ca-certificates curl less zip python3-docutils python3-pip \
nsis gnupg zlibc && \
nsis gnupg && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -23,15 +27,14 @@ RUN pip3 install \

WORKDIR /build

ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw

ARG TOOLCHAIN_ARCHS="i686 x86_64"
# clone a specific tag
RUN git clone --branch $TOOLCHAIN_VERSION \
--single-branch \
https://github.com/mstorsjo/llvm-mingw

ARG DEFAULT_CRT=ucrt
WORKDIR /build/llvm-mingw

# Build everything that uses the llvm monorepo. We need to build the mingw runtime before the compiler-rt/libunwind/libcxxabi/libcxx runtimes.
COPY build-llvm.sh build-lldb-mi.sh strip-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/
RUN ./build-llvm.sh $TOOLCHAIN_PREFIX && \
./build-lldb-mi.sh $TOOLCHAIN_PREFIX && \
./strip-llvm.sh $TOOLCHAIN_PREFIX && \
Expand All @@ -42,11 +45,9 @@ RUN ./build-llvm.sh $TOOLCHAIN_PREFIX && \
./build-libcxx.sh $TOOLCHAIN_PREFIX && \
./build-mingw-w64-libraries.sh $TOOLCHAIN_PREFIX && \
./build-compiler-rt.sh $TOOLCHAIN_PREFIX --build-sanitizers && \
./build-openmp.sh $TOOLCHAIN_PREFIX && \
rm -rf /build/*
./build-openmp.sh $TOOLCHAIN_PREFIX

# Build libssp
COPY build-libssp.sh libssp-Makefile ./
RUN ./build-libssp.sh $TOOLCHAIN_PREFIX && \
rm -rf /build/*

Expand Down

0 comments on commit 4cf14ee

Please sign in to comment.