SET(MINGW64_ROOT "C:/tools/msys64/mingw64") SET(CMAKE_SYSROOT ${MINGW64_ROOT}) SET(CMAKE_C_COMPILER "clang") SET(CMAKE_CXX_COMPILER "clang++") SET(CMAKE_ASM_MASM_COMPILER "uasm") SET(CMAKE_AR "llvm-ar") SET(CMAKE_RANLIB "llvm-ranlib") SET(CMAKE_NM "llvm-nm") SET(CMAKE_RC_COMPILER "llvm-rc") SET(CMAKE_C_FLAGS "-fuse-ld=lld") SET(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS}) SET(CMAKE_C_COMPILER_TARGET "x86_64-w64-mingw32") SET(CMAKE_CXX_COMPILER_TARGET ${CMAKE_C_COMPILER_TARGET}) SET(CMAKE_ASM_COMPILER_TARGET ${CMAKE_C_COMPILER_TARGET})