A C benchmark generator
- Building the project
- Running Jotai
- (Alternative) Using a Docker Image with Clang
- What is Jotai?
- Why is Jotai?
- Clang (You need to built it yourself, can't use precompiled binaries!)
- CMake
To use Jotai, you need to have Clang built on your machine. We used Clang version 12 when writing Jotai. If you haven't yet built Clang, I'd suggest taking a look at this playlist. It's a series of videos on the LLVM and Clang, and writing passes and plugins using their libraries, and it has a tutorial on how to build Clang. Building Clang for the first time can be quite a frustrating experience, but once you get though it, you should be good to go :)
From project root:
mkdir build
cd build
cmake ../ -DLLVM_DIR=${LLVM_BUILD_DIR}/lib/cmake/llvm -DClang_DIR=${LLVM_BUILD_DIR}/lib/cmake/clang
make
Once you have built jotai, you'll need to set up kotai. kotai is the script responsible for calling jotai commands and setting up the final benchmarks. The instructions on how to run kotai are described here: kotai
Building the LLVM project yourself might be a bit troublesome, and take some time. An alternative is using a Docker image that already has the LLVM project compiled inside it.
Note that this is different from using pre built binaries: the project is actually compiled in the operating system you get from the image, so you have access to all the libraries you get when you build LLVM!