Toy tutorial example doesn't compile

I tried compiling this example from ch6 with llvm-project/build/bin/toyc-ch6 obtained from Getting Started - MLIR

$ echo ‘def main() { print([[1, 2], [3, 4]]); }’ | ./bin/toyc-ch6 -emit=jit

JIT invocation failed
Program aborted due to an unhandled Error:
Symbols not found: [ _mlir__mlir_ciface_main ]
Aborted (core dumped)

Thanks for the bug report!
It turns out we missed a test to cover it, so it got broken by a recent refactoring of the JIT. I fixed it in Fix MLIR Toy tutorial JIT example and add a test to cover it · llvm/llvm-project@ae15b1e · GitHub

1 Like