12-23-2024, 01:50 AM
(12-22-2024, 07:03 PM)Kernelpanic Wrote: What is the advantage of LLVM/Clang/LLD/LLDB over normal Posix MingW? -- I downloaded the latest MingW64 GCC 14.2.0 a few minutes ago. It works.
MingW - GCC for Windows
Well, there are a few advantages to using LLVM/Clang/LLD/LLDB over traditional MinGW with GCC. I'll try to list as many as I can remember:
- Native support for Windows on ARM: QB64-PE can compile and run on Windows on ARM thanks to LLVM MinGW. This was successfully implemented last year.
- Cross-platform consistency: Since macOS uses LLVM/Clang as its default toolchain, using LLVM/Clang for Windows helps us catch issues that might otherwise go unnoticed. For example, the _MEM issue when $CHECKING:OFF is used was found when we switched over to Clang. This issue was there on QB64-PE macOS for the longest time and never caught. Clang is also stricter compared to GCC, which, IMO, is beneficial.
- Smaller distribution size: LLVM MinGW has a much smaller payload - almost 25% smaller than the GCC-based compiler we previously bundled.
- Improved compilation speed: LLVM MinGW often provides faster compile times. In some scenarios, I've experienced a 2x improvement in speed.
At the end of the day, if you want to use GCC/MinGW, you still can. We test QB64-PE with GCC (on Linux) and GCC/MinGW, so it is a drop-in replacement.