[Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW
Yang Fan
missdeer at gmail.com
Thu Jul 20 03:55:34 CEST 2023
I wanted to point out that MSYS2 offers precompiled packages of Qt6 in four
different environments: CLANGARM64, MINGW64, CLANG64, and UCRT64. In my
opinion, simply switching among Qt's official precompiled packages and
toolchains doesn't seem to carry significant benefits.
Instead, learning how MSYS2 provides precompiled packages for multiple
toolchains seems to be a more fruitful approach. Alternatively, just
providing support such as mkspecs for users to compile on their own could
also be sufficient.
On Wed, Jul 19, 2023 at 11:47 PM Cristian Adam via Development <
development at qt-project.org> wrote:
> Hi,
>
> we are thinking of migrating from GCC MinGW to LLVM MinGW. The ticket in
> question is [QTBUG-107516] Migrate from GCC MinGW to LLVM-MinGW - Qt Bug
> Tracker <https://bugreports.qt.io/browse/QTBUG-107516>
>
> For a while now we have a CI configuration testing with LLVM MinGW.
>
> The benefits of the LLVM MinGW <https://github.com/mstorsjo/llvm-mingw> would
> be (quote from the website):
>
>
> - *Support for targeting ARM/ARM64 (while GCC obviously does support
> these architectures, it doesn't support Windows on ARM)*
> - A single toolchain targeting all four architectures (i686, x86_64,
> armv7 and arm64) instead of separate compiler binaries for each architecture
> - Support for generating debug info in PDB format
> - Support for Address Sanitizer and Undefined Behaviour Sanitizer
> - Since LLVM 16: Support for Control Flow Guard (-mguard=cf compile
> and link flags)
>
> In the bug report I've tested also gdb 11.2.0 and lldb 16.0.6 with Qt
> Creator's source code and lldb was twice as fast at reaching the breakpoint
> (35s vs 1m14s).
>
> With this migration would should also switch to Universal CRT
> <https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/>.
> The toolchain comes in both ucrt and msvcrt variants, but the former is
> preferrable nowadays.
>
> At Windows Runtime (WinRT) APIs support · Issue #307 ·
> mstorsjo/llvm-mingw (github.com)
> <https://github.com/mstorsjo/llvm-mingw/issues/307> we can see that
> starting with LLVM 15 and with a recent release of C++/WinRT
> <https://github.com/microsoft/cppwinrt/releases> or mingw-w64-cppwinrt
> <https://github.com/alvinhochun/mingw-w64-cppwinrt/releases/> we could
> have feature parity with the Visual C++ toolchain.
>
> I've tried it out with Qt 6.5.2 and LLVM-MinGW 16.0.6 and got the
> following configure output:
>
> Building for: win32-clang-g++ (x86_64, CPU features: mmx sse sse2)
> Compiler: clang 16.0.6
> Build options:
> Using C++ standard ..................... C++20
> Qt Core:
> cpp/winrt base ......................... yes
>
> Note that not all Qt modules using WinRT are working at this time. I
> searched after *winrt*.cpp and got:
> qtbase,qtconnectivity,qtsensors,qtpositioning,qtspeech,qtwebview
>
> Any thoughts about this migration?
>
> Cheers,
> Cristian
> --
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>
--
Regards,
Fan Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230720/cf3fbfd0/attachment.htm>
More information about the Development
mailing list