Ready-to-use environment that makes LLVM pass plugin development easy, inspired by llvm-tutor.
-
Add new plugins to lib and modify
CMakeFiles.txt
accordingly. -
Add your pass to the compiler wrapper by modifying
passes
; -
To build plugins, run
cmake-config.sh
first, thencd build && make
. -
To use different LLVM versions, set the env var
LLVM_CONFIG
before you runcmake-config.sh
, e.g.,LLVM_CONFIG=llvm-config-15 ./cmake-config.sh
if you want to use LLVM-15/clang-15. By default,llvm-config
is used. -
Use the provided compiler wrappers (
build/compiler/custom-clang
andbuild/compiler/custom-clang++
) to compile your programs. The wrappers will automatically load your passes.