Something I hacked together at EuroLLVM to test using LLVM's exported CMake targets and LLVM's pass manager.