mirror of
https://gitlab.com/Syping/qt5-llvm-mingw-docker.git
synced 2024-11-21 21:30:23 +01:00
Update Clang to 11.0.1
This commit is contained in:
parent
2172e1ba6f
commit
55b51d0bae
10 changed files with 77 additions and 42 deletions
|
@ -1,5 +1,4 @@
|
||||||
# Debian Buster is recommended
|
FROM syping/llvm-mingw-debian:11.0.1
|
||||||
FROM syping/llvm-mingw-debian:10.0.1
|
|
||||||
|
|
||||||
# Custom Directory
|
# Custom Directory
|
||||||
ENV CUSTOM_DIRECTORY YES
|
ENV CUSTOM_DIRECTORY YES
|
||||||
|
@ -16,10 +15,10 @@ ENV QT_BUILD 2
|
||||||
ENV ZLIB_VERSION 1.2.11
|
ENV ZLIB_VERSION 1.2.11
|
||||||
ENV LIBPNG_VERSION 1.6.37
|
ENV LIBPNG_VERSION 1.6.37
|
||||||
ENV LIBJPEGTURBO_VERSION 2.0.6
|
ENV LIBJPEGTURBO_VERSION 2.0.6
|
||||||
ENV LIBRESSL_VERSION 3.2.2
|
ENV LIBRESSL_VERSION 3.2.4
|
||||||
ENV OPENSSL_VERSION 1.1.1h
|
ENV OPENSSL_VERSION 1.1.1j
|
||||||
ENV ICU_VERSION 68.1
|
ENV ICU_VERSION 68.2
|
||||||
ENV HB_VERSION 2.7.2
|
ENV HB_VERSION 2.7.4
|
||||||
|
|
||||||
# SSL Choice
|
# SSL Choice
|
||||||
ENV CUSTOM_SSL YES
|
ENV CUSTOM_SSL YES
|
||||||
|
@ -40,9 +39,8 @@ ENV BUILD_MINGW64_STATIC NO
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY qt_build /opt/qt_build/bin/
|
COPY qt_build /opt/qt_build/bin/
|
||||||
|
COPY shared/mingw32-qt-cmake /usr/local/bin/
|
||||||
RUN rm -f /bin/sh && \
|
COPY shared/mingw64-qt-cmake /usr/local/bin/
|
||||||
ln -s /bin/bash /bin/sh
|
|
||||||
|
|
||||||
RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
|
RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
|
@ -50,7 +48,7 @@ RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
|
||||||
rm -rf /temp && \
|
rm -rf /temp && \
|
||||||
/opt/qt_build/bin/qt_build && \
|
/opt/qt_build/bin/qt_build && \
|
||||||
rm -rf /temp && \
|
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 && \
|
apt-get autoremove -y && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Debian Buster is recommended
|
FROM syping/llvm-mingw-debian:11.0.1
|
||||||
FROM syping/llvm-mingw-debian:10.0.1
|
|
||||||
|
|
||||||
# Custom Directory
|
# Custom Directory
|
||||||
ENV CUSTOM_DIRECTORY YES
|
ENV CUSTOM_DIRECTORY YES
|
||||||
|
@ -16,10 +15,10 @@ ENV QT_BUILD 2
|
||||||
ENV ZLIB_VERSION 1.2.11
|
ENV ZLIB_VERSION 1.2.11
|
||||||
ENV LIBPNG_VERSION 1.6.37
|
ENV LIBPNG_VERSION 1.6.37
|
||||||
ENV LIBJPEGTURBO_VERSION 2.0.6
|
ENV LIBJPEGTURBO_VERSION 2.0.6
|
||||||
ENV LIBRESSL_VERSION 3.2.2
|
ENV LIBRESSL_VERSION 3.2.4
|
||||||
ENV OPENSSL_VERSION 1.1.1h
|
ENV OPENSSL_VERSION 1.1.1j
|
||||||
ENV ICU_VERSION 68.1
|
ENV ICU_VERSION 68.2
|
||||||
ENV HB_VERSION 2.7.2
|
ENV HB_VERSION 2.7.4
|
||||||
|
|
||||||
# SSL Choice
|
# SSL Choice
|
||||||
ENV CUSTOM_SSL YES
|
ENV CUSTOM_SSL YES
|
||||||
|
@ -40,10 +39,9 @@ ENV BUILD_MINGW64_SHARED NO
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY qt_build /opt/qt_build/bin/
|
COPY qt_build /opt/qt_build/bin/
|
||||||
COPY qmake-static /usr/local/bin/
|
COPY static/mingw32-qt-cmake /usr/local/bin/
|
||||||
|
COPY static/mingw64-qt-cmake /usr/local/bin/
|
||||||
RUN rm -f /bin/sh && \
|
COPY static/qmake-static /usr/local/bin/
|
||||||
ln -s /bin/bash /bin/sh
|
|
||||||
|
|
||||||
RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
|
RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
|
@ -51,7 +49,7 @@ RUN export PATH=/opt/llvm-mingw/bin:${PATH} && \
|
||||||
rm -rf /temp && \
|
rm -rf /temp && \
|
||||||
/opt/qt_build/bin/qt_build && \
|
/opt/qt_build/bin/qt_build && \
|
||||||
rm -rf /temp && \
|
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 && \
|
apt-get autoremove -y && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
@ -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:shared -f Dockerfile.shared .
|
||||||
docker build -t qt-llvm-mingw-docker:static -f Dockerfile.static .
|
docker build -t qt-llvm-mingw-docker:static -f Dockerfile.static .
|
||||||
|
|
14
qmake-static
14
qmake-static
|
@ -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
|
|
15
qt_build
15
qt_build
|
@ -23,10 +23,10 @@ if [ ! "${CUSTOM_VERSION}" == "YES" ]; then
|
||||||
ZLIB_VERSION=1.2.11
|
ZLIB_VERSION=1.2.11
|
||||||
LIBPNG_VERSION=1.6.37
|
LIBPNG_VERSION=1.6.37
|
||||||
LIBJPEGTURBO_VERSION=2.0.6
|
LIBJPEGTURBO_VERSION=2.0.6
|
||||||
LIBRESSL_VERSION=3.2.2
|
LIBRESSL_VERSION=3.2.4
|
||||||
OPENSSL_VERSION=1.1.1h
|
OPENSSL_VERSION=1.1.1j
|
||||||
ICU_VERSION=68.1
|
ICU_VERSION=68.2
|
||||||
HB_VERSION=2.7.2 # HarfBuzz
|
HB_VERSION=2.7.4 # HarfBuzz
|
||||||
|
|
||||||
# Qt Framework
|
# Qt Framework
|
||||||
QT_SERIES=5.15 # (x.x).y
|
QT_SERIES=5.15 # (x.x).y
|
||||||
|
@ -51,11 +51,14 @@ if [ ! "${CUSTOM_QT_FLAGS}" == "YES" ]; then
|
||||||
QT_FLAGS="-qt-freetype"
|
QT_FLAGS="-qt-freetype"
|
||||||
fi
|
fi
|
||||||
if [ ! "${CUSTOM_QT_SKIP_FLAGS}" == "YES" ]; then
|
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
|
fi
|
||||||
if [ ! "${CUSTOM_QT_NOMAKE_FLAGS}" == "YES" ]; then
|
if [ ! "${CUSTOM_QT_NOMAKE_FLAGS}" == "YES" ]; then
|
||||||
QT_NOMAKE_FLAGS="-nomake tests -nomake examples"
|
QT_NOMAKE_FLAGS="-nomake tests -nomake examples"
|
||||||
fi
|
fi
|
||||||
|
if [ ! "${CUSTOM_QT_NOFEATURE_FLAGS}" == "YES" ]; then
|
||||||
|
QT_NOFEATURE_FLAGS="-no-feature-d3d12"
|
||||||
|
fi
|
||||||
if [ ! "${CUSTOM_QT_OPENGL_FLAGS}" == "YES" ]; then
|
if [ ! "${CUSTOM_QT_OPENGL_FLAGS}" == "YES" ]; then
|
||||||
QT_OPENGL_FLAGS="-opengl desktop"
|
QT_OPENGL_FLAGS="-opengl desktop"
|
||||||
fi
|
fi
|
||||||
|
@ -706,7 +709,7 @@ function qt_build {
|
||||||
if [ -f "config.cache" ]; then
|
if [ -f "config.cache" ]; then
|
||||||
rm -rf *
|
rm -rf *
|
||||||
fi
|
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}
|
${MAKE_GENERATOR}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
shared/mingw32-qt-cmake
Executable file
10
shared/mingw32-qt-cmake
Executable 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
10
shared/mingw64-qt-cmake
Executable 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
11
static/mingw32-qt-cmake
Executable 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
11
static/mingw64-qt-cmake
Executable 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
8
static/qmake-static
Executable 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
|
Loading…
Reference in a new issue