Steffen Geißinger
2010-May-05 18:15 UTC
[LLVMdev] bitcode with llvm-gcc (mingw) for windows
Hi, i'm currently building a small JIT compiler. For the language I need a runtime library for some special math functions. I think the best would be to compile the lib to bitcode and link it. The compiler should be integrated in a product and as of this, it must work under windows (VC10, 64bit). So is it possible to build the math lib with the mingw llvm-gcc build an link it later with the JITed Code? Or are there any problems regarding the portability of the bitcode build with llvm-gcc under mingw? If there are problems, what solution would you suggest. Regards, Steffen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100505/29a20eaa/attachment.html>
On Wed, May 5, 2010 at 2:15 PM, Steffen Geißinger <steffen.geissinger at googlemail.com> wrote:> Hi, > i'm currently building a small JIT compiler. > For the language I need a runtime library for some special math functions. > I think the best would be to compile the lib to bitcode and link it. > The compiler should be integrated in a product and as of this, it must work > under windows (VC10, 64bit). > So is it possible to build the math lib with the mingw llvm-gcc build an > link it later with the JITed Code? > Or are there any problems regarding the portability of the bitcode build > with llvm-gcc under mingw? > If there are problems, what solution would you suggest.Sounds reasonable. Just read the bitcode from the filesystem and pass the module it yields to the JIT when you create it. IR generated by C frontends isn't portable (they lower things like sizeof and handle certain elements of ABI compatibility), so the bitcode would be restricted to the target you compile it for. Reid