I want to execute functions in a module, this module will have dependencies resolved in other modules. the modules might change (dynamic compilation environment) so i would prefer not not link all the dependencies in a single monolithic module, that is, if it can be avoided
I hope to use Linker::linkModules
but this is always destructive on the source module. That is ok for one module depending on a single one, since if that one changed, is no big deal, but isn't it overkill to rebuild and relink N-1 modules that did not change just because of a single one that changed?
I wonder if there is a non-destructive version of linkModules that can work for JIT execution.
B
changes,A
would still need to be relinked to the new B. My point is: if A is linked againstB0
,B1
...BN
and one of them changes, i should only have to relink the references to that one, since the rest did not change. The current linkModules is working as a static linker (copying everything into the target module) – Letourneau