On 11/22/2015 09:10 PM, Andy Jost wrote:
Avi Kivity wrote:
I hope the "runtime library" you refer to is in some intermediate representation, having been partially compiled from C++ when the product is built, and then inlined into the generated code during JIT time. I'd hate to run the full C++ compiler during JIT time. Yes, it is exactly this way. It is easy to compile a runtime library written in C or C++ into a library of LLVM code. See https://github.com/andyjost/Sprite-3/blob/master/runtime/sprite-rt/C/Makefil... for an example.
You may also be interested in linking compiled C++ and LLVM code generated by the EDSL into a single runtime library before the user code is available. See these files:
https://github.com/andyjost/Sprite-3/blob/master/runtime/sprite-rt/llvm/Make... https://github.com/andyjost/Sprite-3/blob/master/runtime/sprite-rt/Makefile
Cool, this is exactly what I want.