[Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Cristian Adam via Development
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 For a while now we have a CI configuration testing with LLVM MinGW. The benefits of the L

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Thiago Macieira
On Wednesday, 19 July 2023 08:46:27 PDT Cristian Adam via Development 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 TL;DR:

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Scott Bloom
> * Support for generating debug info in PDB format How useful is this? Does gdb support this format? If not, then you wouldn't be able to debug stuff, meaning this is not a benefit at all. === I haven't tried this, however, according to what I have read this enables you to build with

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Thiago Macieira
On Wednesday, 19 July 2023 16:01:25 PDT Scott Bloom wrote: > > * Support for generating debug info in PDB format > > How useful is this? Does gdb support this format? If not, then you wouldn't > be able to debug stuff, meaning this is not a benefit at all. > > === > I haven't tried this

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Yang Fan
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 MS

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Thiago Macieira
On Wednesday, 19 July 2023 18:55:34 PDT Yang Fan wrote: > I wanted to point out that MSYS2 offers precompiled packages of Qt6 in four > different environments: CLANGARM64, MINGW64, CLANG64, and UCRT64. Is there any difference between mingw64 and clang64, aside from which compiler was used to comp

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Yang Fan
I believe the primary difference lies in the C and C++ Libraries. MINGW64 uses msvcrt and libstdc++, while CLANG64 employs ucrt and libc++. On Thu, Jul 20, 2023 at 10:22 AM Thiago Macieira wrote: > On Wednesday, 19 July 2023 18:55:34 PDT Yang Fan wrote: > > I wanted to point out that MSYS2 offe

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-19 Thread Martin Storsjö
On Wed, 19 Jul 2023, Thiago Macieira wrote: On Wednesday, 19 July 2023 08:46:27 PDT Cristian Adam via Development wrote: With this migration would should also switch to Universal CRT. The toolchain comes in both ucrt and ms

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Martin Storsjö
On Thu, 20 Jul 2023, Martin Storsjö wrote: On Wed, 19 Jul 2023, Thiago Macieira wrote: It's also orthogonal, because GCC supports UCRT too, with this patch: https://github.com/msys2/MINGW-packages/raw/ 8d9ebb74412c1faabc2a3935bfc705bec19edb9a/mingw-w64-gcc/0006-Windows-New- feature-to-allow-ov

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Kai Köhne via Development
> From: Development on behalf of Yang Fan > > Sent: Thursday, July 20, 2023 3:55 AM > To: Cristian Adam > Cc: development@qt-project.org > Subject: Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW > > I wanted to point out that MSYS2 offers precompiled pa

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Hasselmann Mathias via Development
Am 20.07.2023 um 04:21 schrieb Thiago Macieira: On Wednesday, 19 July 2023 18:55:34 PDT Yang Fan wrote: I wanted to point out that MSYS2 offers precompiled packages of Qt6 in four different environments: CLANGARM64, MINGW64, CLANG64, and UCRT64. Is there any difference between mingw64 and clang

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Thiago Macieira
On Wednesday, 19 July 2023 23:48:43 PDT Martin Storsjö wrote: > Switching with those flags works, as long as you're building a C-only > executable and linking libgcc statically (and not linking in any static > libraries that were built for another CRT). I'm pretty sure that libstdc++ > touches lots

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Thiago Macieira
On Thursday, 20 July 2023 01:50:50 PDT Hasselmann Mathias via Development wrote: > MSYS2 has a configuration matrix on their website: > https://www.msys2.org/docs/environments/ Thanks, that's very informative. To Cristian: is the proposal to also switch from libstdc++ to libc++? -- Thiago Maci

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Cristian Adam via Development
On 07/20/2023 14:47, Thiago Macieira wrote: > On Thursday, 20 July 2023 01:50:50 PDT Hasselmann Mathias via Development > wrote: >> MSYS2 has a configuration matrix on their website: >> https://www.msys2.org/docs/environments/ > Thanks, that's very informative. > > To Cristian: is the proposal to a

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Martin Storsjö
On Thu, 20 Jul 2023, Thiago Macieira wrote: On Wednesday, 19 July 2023 23:48:43 PDT Martin Storsjö wrote: Switching with those flags works, as long as you're building a C-only executable and linking libgcc statically (and not linking in any static libraries that were built for another CRT). I'm

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Cristian Adam via Development
On 07/19/2023 18:14, Thiago Macieira wrote: On Wednesday, 19 July 2023 08:46:27 PDT Cristian Adam via Development 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

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Thiago Macieira
On Thursday, 20 July 2023 06:03:27 PDT Cristian Adam via Development wrote: > On 07/20/2023 14:47, Thiago Macieira wrote: > > To Cristian: is the proposal to also switch from libstdc++ to libc++? > > Yes, LLVM MinGW only comes with libc++. Thanks, then that's doubly binary-incompatible. We canno

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Cristian Adam via Development
On 07/20/2023 15:48, Cristian Adam via Development wrote: At How to open Windows crash dumps? | Qt Forum this is one case of using Windows minidump files with MinGW, which is not supported. With the LLVM MinGW and the PDB format

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Thiago Macieira
On Thursday, 20 July 2023 06:14:24 PDT Martin Storsjö wrote: > So are you saying that you're building your app with a non-default CRT > selected with the -mcrtdll option? Yes. > If you use the GCC -mcrtdll option for picking a non-default CRT, it would > work unless you're also linking, even stat

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Martin Storsjö
On Thu, 20 Jul 2023, Thiago Macieira wrote: On Thursday, 20 July 2023 06:14:24 PDT Martin Storsjö wrote: So are you saying that you're building your app with a non-default CRT selected with the -mcrtdll option? Yes. If you use the GCC -mcrtdll option for picking a non-default CRT, it would

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-20 Thread Martin Storsjö
On Thu, 20 Jul 2023, Cristian Adam via Development wrote: On 07/20/2023 15:48, Cristian Adam via Development wrote: At How to open Windows crash dumps? | Qt Forum this is one case of using Windows minidump files with MinGW, which is not supported. With the LLVM MinGW

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-21 Thread Martin Storsjö
On Thu, 20 Jul 2023, Cristian Adam via Development wrote: WinDbg didn't work, but lldb.exe itself works: lldb MaxiDump.exe --core MaxiDump.dmp I've updated cristianadam/MaxiDump (github.com) with this new information. FWIW, I didn't test minidumps, but I tested that PDBs currently do w

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-21 Thread Cristian Adam via Development
On 07/21/2023 14:26, Cristian Adam via Development wrote: On 07/21/2023 11:04, Martin Storsjö wrote: - With LLDB: As LLDB supports both DWARF and PDB, it will prefer DWARF if such debug info was found. As other toolchain files that are linked in happen to have some DWARF in them, the executable

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-21 Thread Martin Storsjö
On Fri, 21 Jul 2023, Cristian Adam wrote: Right, lldb was using the DWARF debugging information 🙁 I've attached 3 screenshots of Qt Creator using lldb: 1.  Unstripped MaxiDump.exe showed the bad source line and the correct stacktrace (due to DWARF information) 2. Stripped MaxiDump.exe wi

Re: [Development] [RFCs] Migrate from GCC MinGW to LLVM MinGW

2023-07-21 Thread Cristian Adam via Development
On 07/21/2023 14:46, Martin Storsjö wrote: On Fri, 21 Jul 2023, Cristian Adam wrote: Right, lldb was using the DWARF debugging information 🙁 I've attached 3 screenshots of Qt Creator using lldb: 1. Unstripped MaxiDump.exe showed the bad source line and the correct stacktrace (due to DWARF