[LLVMdev] runtime library for jitted code

Albert Graef Dr.Graef at t-online.de
Mon Jun 15 07:39:49 PDT 2009


Victor Zverovich wrote:
> I am considering a possibility of using LLVM JIT for an algebraic
> modelling language. I have already done some prototyping following the
> Kaleidoscope tutorial and currently thinking of how to connect the
> jitted code to a runtime library (for this language) which I would like
> to code in C++. If it was *NIX I would use g++ possibly with '-rdynamic'
> option as suggested in the tutorial to resolve required functions at
> runtime. However it is not an option, I am stuck to Windows and Visual
> C++.

Well, backlinking doesn't work on Windows, but you can create a dll for
your runtime and use LLVM's dynamic library interface to load that dll.
I'm doing it that way in my project (http://pure-lang.googlecode.com/,
search for 'sys::DynamicLibrary::' in interpreter.cc) and it works fine
on Windows.

Albert

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the llvm-dev mailing list