if (WIN32)
  # Use static CRT
  set(LLVM_USE_CRT_DEBUG MTd)
  set(LLVM_USE_CRT_RELEASE MT)
  set(LLVM_USE_CRT_MINSIZEREL MT)
  set(LLVM_USE_CRT_RELWITHDEBINFO MT)

  # Enable debug information for Release builds
  set(CMAKE_CXX_FLAGS_RELEASE_INIT /Zi)
  set(CMAKE_C_FLAGS_RELEASE_INIT /Zi)
  set(CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT "/debug /OPT:REF /OPT:ICF")
endif()
