This is a mlir toy toturial standalone build project.
$ git clone https::https://github.com/llvm/llvm-project
$ cd llvm-project
$ mkdir build && cd build
$ cmake -G Ninja ../llvm \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTION=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_INSTALL_UTILS=ON \
-DMLIR_INCLUDE_INTEGRATION_TEST=ON \
$ ninja
$ sudo ninja install
$ cd mlir-toy
$ mkdir build && cd build
$ cmake -G Ninja ..
$ ninja
$ ./build/bin/toyc-ch1 test/Ch1/ast.toy -emit=ast