Linking Modules with the C API

I am using the C API to build up an IR representation of a module and then run it via the JIT. I have gotten to the point that putting everything in one module is starting to get to be too much. I want to be able to link two modules together and then run them. Searching through the internet it looks like this is possible with the C++ API using the Linker class. Is there an exposed way of doing this with the C API? My current stop gap is to call out to llvm-link but this seems messy.

Thanks,
Eric

Hi Eric,

I am using the C API to build up an IR representation of a module and then run it via the JIT. I have gotten to the point that putting everything in one module is starting to get to be too much. I want to be able to link two modules together and then run them. Searching through the internet it looks like this is possible with the C++ API using the Linker class. Is there an exposed way of doing this with the C API? My current stop gap is to call out to llvm-link but this seems messy.

it looks like the C API does not provide access to the Linker class.
It would be great if you could add support for it. Patches are always
welcome :slight_smile:

Ciao,

Duncan.