Skip to content

Getting started


You will need to install CMake, the Ninja CMake generator, and the clang or MSVC C/C++ compilers:


You are welcome to try different CMake generators and compilers, but IREE devs and CIs exclusively use these and other configurations are "best effort". Additionally, compilation on macOS is "best effort" as well, though we generally expect it to work due to its similarity with Linux. Patches to improve support for these are always welcome.

  1. Install a compiler/linker (typically "clang" and "lld" package)

  2. Install CMake (typically "cmake" package)

  3. Install Ninja (typically "ninja-build" package)

On a relatively recent Debian/Ubuntu:

sudo apt install cmake ninja-build clang lld
  1. Install MSVC from Visual Studio or "Tools for Visual Studio" on the official downloads page

  2. Install CMake from the official downloads page

  3. Install Ninja either from the official site


You will need to initialize MSVC by running vcvarsall.bat to use it from the command line. See the official documentation for details.

Clone and build

Use Git to clone the IREE repository and initialize its submodules:

git clone
cd iree
git submodule update --init

Configure then build all targets using CMake:

Configure CMake:

# Recommended for simple development using clang and lld:
cmake -GNinja -B ../iree-build/ -S . \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \

# Alternately, with system compiler and your choice of CMake generator:
# cmake -B ../iree-build/ -S .

# Additional quality of life CMake flags:
# Enable ccache:
# See
cmake -GNinja -B ../iree-build/ -S . \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \


cmake --build ../iree-build/

We recommend using the RelWithDebInfo build type by default for a good balance of debugging information and performance. The Debug, Release, and MinSizeRel build types are useful in more specific scenarios. In particular, note that several useful LLVM debugging features are only available in Debug builds. See the official CMake documentation for general details.

What's next?

Running tests

Build test dependencies:

cmake --build ../iree-build --target iree-test-deps

Run all built tests through CTest:

ctest --test-dir ../iree-build/ --output-on-failure

Take a look around

Check out the contents of the 'tools' build directory:

ls ../iree-build/tools/
../iree-build/tools/iree-compile --help