Allow overriding the default crt in dockerfiles with --build-arg DEFAULT_CRT=msvcrt

This commit is contained in:
Martin Storsjö committed 2019-11-13 12:39:30 +02:00
1 parent dcf34a9a35
commit b5ae2b5cc7
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -17,13 +17,15 @@ ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw
ARG TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64"
ARG DEFAULT_CRT=ucrt
# 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 strip-llvm.sh install-wrappers.sh build-mingw-w64.sh build-compiler-rt.sh build-mingw-w64-libraries.sh build-libcxx.sh ./
COPY wrappers/*.sh wrappers/*.c wrappers/*.h ./wrappers/
RUN ./build-llvm.sh $TOOLCHAIN_PREFIX && \
./strip-llvm.sh $TOOLCHAIN_PREFIX && \
./install-wrappers.sh $TOOLCHAIN_PREFIX && \
./build-mingw-w64.sh $TOOLCHAIN_PREFIX && \
./build-mingw-w64.sh $TOOLCHAIN_PREFIX --with-default-msvcrt=$DEFAULT_CRT && \
./build-compiler-rt.sh $TOOLCHAIN_PREFIX && \
./build-mingw-w64-libraries.sh $TOOLCHAIN_PREFIX && \
./build-libcxx.sh $TOOLCHAIN_PREFIX && \
+3 -1
View File
@@ -36,9 +36,11 @@ COPY wrappers/*.sh wrappers/*.c wrappers/*.h ./wrappers/
COPY install-wrappers.sh ./
RUN ./install-wrappers.sh $TOOLCHAIN_PREFIX
ARG DEFAULT_CRT=ucrt
# Build MinGW-w64
COPY build-mingw-w64.sh ./
RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX
RUN ./build-mingw-w64.sh $TOOLCHAIN_PREFIX --with-default-msvcrt=$DEFAULT_CRT
# Build compiler-rt
COPY build-compiler-rt.sh ./