@@ -30,3 +30,48 @@ tools.
30
30
| ![ clang64] ( clang64.png ) {: style="max-width:25px" } | ** CLANG64** | ` /clang64 ` | llvm | x86_64 | ucrt | libc++ |
31
31
| ![ mingw32] ( mingw32.png ) {: style="max-width:25px" } | ** MINGW32** | ` /mingw32 ` | gcc | i686 | msvcrt | libstdc++ |
32
32
33
+ ## GCC vs LLVM/Clang
34
+
35
+ These are the default compilers/toolchains used for building all packages in the
36
+ respective repositories.
37
+
38
+ ** GCC** based environments:
39
+
40
+ * Widely tested/used at this point
41
+ * Fortran support
42
+ * While there also exists a Clang package in the MINGW environments, that one
43
+ still uses the GNU linker and the GNU C++ library. In same cases Clang is used
44
+ to build packages as well there, in case upstream prefers Clang over gcc for
45
+ example.
46
+
47
+ ** LLVM/Clang** based environments:
48
+
49
+ * Only uses LLVM tools, LLD as a linker, LIBC++ as a C++ standard library
50
+ * Clang provides ASAN support
51
+ * Native TLS support
52
+ * LLD is faster than LD, but does not support all the features LD supports
53
+ * Some tools lack feature parity with equivalent GNU tools
54
+ * Supports ARM64 on Windows
55
+
56
+ ## MSVCRT vs UCRT
57
+
58
+ These are two variants of the C standard library on Windows.
59
+
60
+ ** MSVCRT** is available by default on all Windows versions, but due to backwards
61
+ compatibility issues is stuck in the past, not C99 compatible and is missing
62
+ some features.
63
+
64
+ * It isn't C99 compatible, for example the printf() function family, but...
65
+ * mingw-w64 provides replacement functions to make things C99 compatible in many
66
+ cases
67
+ * It doesn't support the UTF-8 locale
68
+ * Because MSVC uses UCRT, and CRTs shouldn't be mixed, you can't mix it with
69
+ libraries built with MSVC.
70
+ * Works out of the box on every Windows machine.
71
+
72
+ ** UCRT** is a newer version which is also used by Visual Studio by default. It
73
+ should work and behave as if the code was compiled with MSVC.
74
+
75
+ * Better compatibility with MSVC, both at build time and at run time.
76
+ * It only ships by default on Windows 10 and for older versions you have to
77
+ provide it yourself or depend on the user having it installed.
0 commit comments