[LLVMdev] Correct way of JITing multiple modules?

David Chisnall csdavec at swansea.ac.uk
Sun Aug 31 07:54:55 PDT 2008


I'm trying to work out the correct way of JITing multiple modules.   
My original approach was to create a new ExecutionEngine for each  
Module, however this generates an assert failure.  If I create a new  
ModuleProvider for each new Module and then add this to a single  
ExecutionEngine then I have a problem with static constructors not  
being run.  With a single module, I can call  
runStaticConstructorsDestructors().  With the second one, neither  
ommitting this nor calling it a second time appears to work (I don't  
think either of these is exactly correct, since I don't want to run  
the static constructors on pre-existing modules twice, I just want  
static ctors to run in the new module).

Can anyone advise?


More information about the llvm-dev mailing list