Hi,
The person that developed the bindings is Jarno Seppänen , he sent me
the code a few weeks ago. They were build with Boost.Python. The
latest version was for LLVM 1.6 and the bindings seem to be
unmaintained at the moment. From what I could tell they are very
clean and probably easy to maintain/update to LLVM 1.7. From what I
could tell from the email archive they were not far from being
'integrated' in the LLVM codebase. I have no idea why that never
happened. (probably just because it never happened). It would be nice
if someone (you?) could adopt his code.
I asked Jarno if I could redistribute his code and he was positive
about that so I will mail you the zip file privately.
There is another thing happening in this area. I am working on the
LLVM backend for the PyPy project (see: http://codespeak.net/pypy ) .
For this I also want python bindings. However they need to be
bindings for a C library so Python's ctypes ffi library can handle
them. LLVM currently is a C++ only library, so I am writing a tool to
be able to specify the (LLVM) class layout in a boost-like way. The
tools will then generate the C API and ctypes compatible bindings. (I
was thinking of writing a ctypes backend for SWIG but that was one
more codebase and my brain wouldn't handle that). It would probably
be straightforward to generate a SWIG interface file (llvm.i) with my
tool. This would (in a rather indirect way) create binding for many
languages.
Please note that at this time I am note sure if I will create
bindings for just what I need for PyPy or if I will try to support
most of the C++ API.
If you want some Python LLVM bindings to play with today I would
suggest you have a look at what I created 'by hand' (to get a feeling
of the issues involved) in the llvmcapi and pyllvm subdirectories of
http://codespeak.net/svn/pypy/dist/pypy/translator/llvm/
have fun!
Eric
On Apr 12, 2006, at 3:52 PM, Pertti Kellomäki wrote:
> Hello all,
>
> I am involved in a compiler project for Transport
> Triggered Architectures (think VLIW and you are
> pretty close), and we are considering using LLVM.
> Browsing the list archives, I noticed an announcement
> of Python bindings for LLVM 1.5. Does anyone know the
> current status of the bindings?
> --
> Pertti
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20060412/8b60c6e2/attachment.html>