There are several motivations to enable ctor/dtor support:
1. ASan. This is not just about my wine-asan work, this is important for @bernhardu's PE asan work as well. The compiler generates ctors that poisons memory around global variables so misuses of them can be caught. This is the same both of our implementations of ASan. 2. Building third-party codebases against wine's CRT. This is not necessary for mingw-gcc or llvm-mingw, but the MSVC frontend of clang is another option for cross-compiling to Windows. However right now that requires Windows SDK. Bringing wine CRT to the point of being functional enough will give us another option. Could be useful for things like Proton. 3. (Controversial) Many dlls perform init/deinit tasks in `DllMain`. Some of them might benefit from a conversion to ctor/dtor.
Since nothing in wine uses ctor/dtor right now, this change shouldn't have any impact by itself.
-- v3: msvcrt: Run ctors and dtors from mainCRTStartup. winecrt0: Run ctors and dtors from DllMainCRTStartup.