LLVM-MSVC: Open Source LLVM Compiler Fork with Full MSVC 2022 Compatibility for Windows Kernel Development

terminal
$ echo ""

A powerful LLVM fork designed for Windows kernel development, featuring full MSVC 2022 compatibility and SEH support.

... stars... forks... releases

Features

MSVC Compatibility

Compatible with MSVC syntax as much as possible

SEH Support

Almost fully compatible with Structured Exception Handling

VMX Intrinsics

Added special Intrinsic functions like __vmx_vmread/__vmx_write

Windows Drivers

Supports x64/ARM64 Windows kernel mode drivers

Android GKI

Supports AArch64 Android GKI drivers

Naked X64 ASM

Allows naked X64 inline assembly

Multi-core Build

Enables multiple cores compilation with /MP support

LTO Support

Supports /GL for Link Time Optimization

Quick Start

Installation Steps
1Install Visual Studio 2015-2022 (2022 recommended) with WDK11
2Download llvm-msvc installer from GitHub Releases
3Run llvm-msvc_X86_64_installer-PDB.exe
4Create Windows driver project in Visual Studio
5Select "LLVM-MSVC_v143_KernelMode" as platform toolset
6Build your project!
Download from Releases
Build from Source
# RelWithDebInfo build
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022" -A X64 \
  -DLLVM_ENABLE_RPMALLOC=ON \
  -DCMAKE_CXX_FLAGS="/utf-8" \
  -DCMAKE_C_FLAGS="/utf-8" \
  -DLLVM_ENABLE_PACK_PDB=ON \
  -DLLDB_ENABLE_PYTHON=OFF \
  -DLLVM_ENABLE_PROJECTS="clang;lld;lldb" \
  -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  ../llvm

msbuild /m -p:Configuration=RelWithDebInfo INSTALL.vcxproj

Frequently Asked Questions

Common questions about LLVM-MSVC, compatibility, and how to get started with the project.

Common Questions

Ready to build with LLVM-MSVC?

Start developing Windows kernel drivers with full MSVC compatibility today. Download the free, open-source compiler toolchain.