I am trying to implement basic functions for my language like printing to the standard output. I was wondering how I can add the functions to the LLJIT. I read about linking Dynamic Libraries in the docs. Can you tell me how to do it easily? In the official llvm tutorial using KaleidoscopeJIT, you can just mark a function extern and it will be callable from the IR. Can I do something similar here?
When I mark a function extern I register it in the Module, but the JIT can’t find the symbol. Is there some more configuration that needs to be done?
Thanks in advance!