-
GCC supports using a custom spec file to override the default rules of linking in -lmsvcrt and -lkernel32 etc. Clang doesn't support spec files. But the mingw target in clang recognizes certain libraries (-lmsvcr* and -lucrt*, and -lwindowsapp) and will omit the corresponding default library rules if these are found. And since llvm-mingw uses lld for linking, which is less picky about the exact order of library flags than binutils ld, adding these libraries in EXTRA_LDFLAGS works just fine for this case. Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2fd3ac1c