mlir-gccjit

An MLIR dialect for libgccjit

Build and Test

Prerequisites

In general you need the following tools and libraries to build mlir-gccjit:

  • A working C++ compiler toolchain that supports C++17 standard.
  • CMake with minimum version 3.22.
  • Ninja build system (recommended but not mandatory).
  • LLVM libraries and development files. For now we have only tested LLVM-18.
  • MLIR libraries and development files. For now we have only tested MLIR-18.
  • libgccjit libraries and development files. For now we have only tested libgccjit-14.

For Ubuntu 24.04 (noble) users:

apt-get install build-essential cmake ninja-build llvm-18-dev llvm-18-tools libmlir-18-dev libgccjit-14-dev mlir-18-tools

Additionally, you need Python and the lit tool to run tests. You can install the tool via pip:

pip install lit

Build

Clone the repository:

git clone https://github.com/Lancern/mlir-gccjit.git
cd mlir-gccjit

Create a build directory:

mkdir build
cd build

Build with CMake and ninja:

cmake -G Ninja ..
ninja

You can run all tests via the check target:

ninja check
Last updated on 29 Nov 2024
Published on 29 Nov 2024