Open Pebaz opened 4 years ago
Sorry that I missed this question. LLD is a linker separate from LLVM so your question is a bit outside the scope of inkwell.
But you'd want to build some sort of output object file which you can then pass to LLD. I'm not sure if Inkwell has great support for building object files yet, but it might be possible.
I was trying to figure out how to write an object file and I found this issue.
In case someone else is in the same situation: the TargetMachine::write_to_file
or TargetMachine::write_to_memory_buffer
functions are likely what you're looking for.
How do I link a simple hello-world LLVM module into an executable using LLD? Per this documentation for LLVM, this is possible from code but I am not sure it is implemented in Inkwell.