Skip to content
  • Martin Storsjö's avatar
    Support building with clang from llvm-mingw · 2fd3ac1c
    Martin Storsjö authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
    
    
    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: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
    2fd3ac1c