Update Clang to 11.0.1

This commit is contained in:
Syping 2021-02-17 22:48:08 +01:00
parent 2172e1ba6f
commit 55b51d0bae
10 changed files with 77 additions and 42 deletions

View file

@ -1,5 +1,4 @@
# Debian Buster is recommended
FROM syping/llvm-mingw-debian:10.0.1
FROM syping/llvm-mingw-debian:11.0.1
# Custom Directory
ENV CUSTOM_DIRECTORY YES
@ -16,10 +15,10 @@ ENV QT_BUILD 2
ENV ZLIB_VERSION 1.2.11
ENV LIBPNG_VERSION 1.6.37
ENV LIBJPEGTURBO_VERSION 2.0.6
ENV LIBRESSL_VERSION 3.2.2
ENV OPENSSL_VERSION 1.1.1h
ENV ICU_VERSION 68.1
ENV HB_VERSION 2.7.2
ENV LIBRESSL_VERSION 3.2.4
ENV OPENSSL_VERSION 1.1.1j
ENV ICU_VERSION 68.2
ENV HB_VERSION 2.7.4
# SSL Choice
ENV CUSTOM_SSL YES
@ -40,9 +39,8 @@ ENV BUILD_MINGW64_STATIC NO
WORKDIR /
COPY qt_build /opt/qt_build/bin/
RUN rm -f /bin/sh && \
ln -s /bin/bash /bin/sh
COPY shared/mingw32-qt-cmake /usr/local/bin/
COPY shared/mingw64-qt-cmake /usr/local/bin/
RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
apt-get update && \
@ -50,7 +48,7 @@ RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
rm -rf /temp && \
/opt/qt_build/bin/qt_build && \
rm -rf /temp && \
apt-get remove -y cmake g++ libucl-dev nasm ninja-build perl python zlib1g-dev && \
apt-get remove -y g++ libucl-dev nasm ninja-build perl python zlib1g-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

View file

@ -1,5 +1,4 @@
# Debian Buster is recommended
FROM syping/llvm-mingw-debian:10.0.1
FROM syping/llvm-mingw-debian:11.0.1
# Custom Directory
ENV CUSTOM_DIRECTORY YES
@ -16,10 +15,10 @@ ENV QT_BUILD 2
ENV ZLIB_VERSION 1.2.11
ENV LIBPNG_VERSION 1.6.37
ENV LIBJPEGTURBO_VERSION 2.0.6
ENV LIBRESSL_VERSION 3.2.2
ENV OPENSSL_VERSION 1.1.1h
ENV ICU_VERSION 68.1
ENV HB_VERSION 2.7.2
ENV LIBRESSL_VERSION 3.2.4
ENV OPENSSL_VERSION 1.1.1j
ENV ICU_VERSION 68.2
ENV HB_VERSION 2.7.4
# SSL Choice
ENV CUSTOM_SSL YES
@ -40,10 +39,9 @@ ENV BUILD_MINGW64_SHARED NO
WORKDIR /
COPY qt_build /opt/qt_build/bin/
COPY qmake-static /usr/local/bin/
RUN rm -f /bin/sh && \
ln -s /bin/bash /bin/sh
COPY static/mingw32-qt-cmake /usr/local/bin/
COPY static/mingw64-qt-cmake /usr/local/bin/
COPY static/qmake-static /usr/local/bin/
RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
apt-get update && \
@ -51,7 +49,7 @@ RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
rm -rf /temp && \
/opt/qt_build/bin/qt_build && \
rm -rf /temp && \
apt-get remove -y cmake g++ libucl-dev nasm ninja-build perl python zlib1g-dev && \
apt-get remove -y g++ libucl-dev nasm ninja-build perl python zlib1g-dev && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

View file

@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
docker build -t qt-llvm-mingw-docker:shared -f Dockerfile.shared .
docker build -t qt-llvm-mingw-docker:static -f Dockerfile.static .

View file

@ -1,14 +0,0 @@
#!/bin/bash
if [ "${QMAKE_FORCE_ALL_STATIC}" == "YES" ]; then
qmake "$@" LIBS+=-static
else
QMAKE_XSPEC=$(qmake -query QMAKE_XSPEC)
if [ "${QMAKE_XSPEC}" == "win32-clang-g++" ]; then
qmake "$@" LIBS+=-static
elif [ "${QMAKE_XSPEC}" == "win32-g++" ]; then
qmake "$@" LIBS+=-static-libgcc LIBS+=-static-libstdc++
else
qmake "$@" LIBS+=-static # Force all static because compiler unknown
fi
fi

View file

@ -23,10 +23,10 @@ if [ ! "${CUSTOM_VERSION}" == "YES" ]; then
ZLIB_VERSION=1.2.11
LIBPNG_VERSION=1.6.37
LIBJPEGTURBO_VERSION=2.0.6
LIBRESSL_VERSION=3.2.2
OPENSSL_VERSION=1.1.1h
ICU_VERSION=68.1
HB_VERSION=2.7.2 # HarfBuzz
LIBRESSL_VERSION=3.2.4
OPENSSL_VERSION=1.1.1j
ICU_VERSION=68.2
HB_VERSION=2.7.4 # HarfBuzz
# Qt Framework
QT_SERIES=5.15 # (x.x).y
@ -51,11 +51,14 @@ if [ ! "${CUSTOM_QT_FLAGS}" == "YES" ]; then
QT_FLAGS="-qt-freetype"
fi
if [ ! "${CUSTOM_QT_SKIP_FLAGS}" == "YES" ]; then
QT_SKIP_FLAGS="-skip qtactiveqt -skip qtconnectivity -skip qtlocation -skip qtmultimedia -skip qtwebengine -skip qtwebglplugin"
QT_SKIP_FLAGS="-skip qtactiveqt -skip qtconnectivity -skip qtlocation -skip qtwebengine -skip qtwebglplugin"
fi
if [ ! "${CUSTOM_QT_NOMAKE_FLAGS}" == "YES" ]; then
QT_NOMAKE_FLAGS="-nomake tests -nomake examples"
fi
if [ ! "${CUSTOM_QT_NOFEATURE_FLAGS}" == "YES" ]; then
QT_NOFEATURE_FLAGS="-no-feature-d3d12"
fi
if [ ! "${CUSTOM_QT_OPENGL_FLAGS}" == "YES" ]; then
QT_OPENGL_FLAGS="-opengl desktop"
fi
@ -706,7 +709,7 @@ function qt_build {
if [ -f "config.cache" ]; then
rm -rf *
fi
"${SOURCE_DIR_QT}/configure" -prefix "${PREFIX_DIR}/lib/${COMPILER}/qt_${QT_VERSION}${TARGET_SUFFIX}" -headerdir "${PREFIX_DIR}/include/qt_${QT_VERSION}" -datadir "${QT_SHARE_DIR}/qt_${QT_VERSION}" -sysconfdir "${QT_SYSCONF_DIR}" -device-option CROSS_COMPILE=${COMPILER}- -xplatform ${QT_XPLATFORM} ${QT_BUILDTYPE_FLAGS} -${TARGET_TYPE} ${QT_FLAGS} ${QT_LIBS_FLAGS} ${QT_SKIP_FLAGS} ${QT_NOMAKE_FLAGS} ${QT_OPENGL_FLAGS} ${TARGET_FLAGS} -opensource -confirm-license ${QT_EXTRA_FLAGS}
"${SOURCE_DIR_QT}/configure" -prefix "${PREFIX_DIR}/lib/${COMPILER}/qt_${QT_VERSION}${TARGET_SUFFIX}" -headerdir "${PREFIX_DIR}/include/qt_${QT_VERSION}" -datadir "${QT_SHARE_DIR}/qt_${QT_VERSION}" -sysconfdir "${QT_SYSCONF_DIR}" -device-option CROSS_COMPILE=${COMPILER}- -xplatform ${QT_XPLATFORM} ${QT_BUILDTYPE_FLAGS} -${TARGET_TYPE} ${QT_FLAGS} ${QT_LIBS_FLAGS} ${QT_SKIP_FLAGS} ${QT_NOMAKE_FLAGS} ${QT_NOFEATURE_FLAGS} ${QT_OPENGL_FLAGS} ${TARGET_FLAGS} -opensource -confirm-license ${QT_EXTRA_FLAGS}
${MAKE_GENERATOR}
}

10
shared/mingw32-qt-cmake Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
cmake \
"-DCMAKE_SYSTEM_NAME=Windows" \
"-DCMAKE_SYSTEM_PROCESSOR=x86" \
"-DCMAKE_C_COMPILER=i686-w64-mingw32-clang" \
"-DCMAKE_CXX_COMPILER=i686-w64-mingw32-clang++" \
"-DCMAKE_RC_COMPILER=i686-w64-mingw32-windres" \
"-DCMAKE_PREFIX_PATH=/usr/local/lib/i686-w64-mingw32/qt5" \
"$@"

10
shared/mingw64-qt-cmake Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
cmake \
"-DCMAKE_SYSTEM_NAME=Windows" \
"-DCMAKE_SYSTEM_PROCESSOR=amd64" \
"-DCMAKE_C_COMPILER=x86_64-w64-mingw32-clang" \
"-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-clang++" \
"-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres" \
"-DCMAKE_PREFIX_PATH=/usr/local/lib/x86_64-w64-mingw32/qt5" \
"$@"

11
static/mingw32-qt-cmake Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
cmake \
"-DCMAKE_SYSTEM_NAME=Windows" \
"-DCMAKE_SYSTEM_PROCESSOR=x86" \
"-DCMAKE_C_COMPILER=i686-w64-mingw32-clang" \
"-DCMAKE_CXX_COMPILER=i686-w64-mingw32-clang++" \
"-DCMAKE_RC_COMPILER=i686-w64-mingw32-windres" \
"-DCMAKE_PREFIX_PATH=/usr/local/lib/i686-w64-mingw32/qt5" \
"-DCMAKE_EXE_LINKER_FLAGS=-static" \
"$@"

11
static/mingw64-qt-cmake Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
cmake \
"-DCMAKE_SYSTEM_NAME=Windows" \
"-DCMAKE_SYSTEM_PROCESSOR=amd64" \
"-DCMAKE_C_COMPILER=x86_64-w64-mingw32-clang" \
"-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-clang++" \
"-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres" \
"-DCMAKE_PREFIX_PATH=/usr/local/lib/x86_64-w64-mingw32/qt5" \
"-DCMAKE_EXE_LINKER_FLAGS=-static" \
"$@"

8
static/qmake-static Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
QMAKE_XSPEC=$(qmake -query QMAKE_XSPEC)
if [ "${QMAKE_XSPEC}" == "win32-g++" ]; then
qmake "$@" LIBS+=-static-libgcc LIBS+=-static-libstdc++
else
qmake "$@" LIBS+=-static
fi