[pypy-dev] Re: [LLVMdev] Python-LLVM bindings updated

Reid Spencer reid at x10sys.com
Sun May 22 16:36:33 CEST 2005


Hi Jarno,

This is great! We would absolutely love to have python bindings for
LLVM. 

From the look of your patch, I think we want this to become an LLVM
project since it has configuration and compiler support that is new to
the main LLVM repository. We don't want the main LLVM libraries to be
dependent on Boost or Python.  So, there's a couple things we need to
have you do before this patch is accepted. 

1. Please place it in a directory named something like "llvm-py", not 
   in "lib"
2. Make this "llvm-py" directory look like an llvm project. You can 
   find a sample project at llvm/projects/sample and a more full
   blown example in llvm/projects/Stacker. Please also make sure you  
   read http://llvm.cs.uiuc.edu/docs/Projects.html which will help you
   set up a project. You might also find the Projects section
   of http://llvm.cs.uiuc.edu/docs/MakefileGuide.html useful.
3. Fix your Makefile to build a shared library properly. You have set
   TOOLNAME which is for building an executable tool not a shared
   library. You need to set LIBRARYNAME=..., not TOOLNAME=...
4. Fix the name of your project. It currently builds "llvm.so" which
   is not correct by our naming standards. It should result to something
   like "libLLVMpy.so" which will be obtained if you set LIBRARYNAME
   to "LLVMpy"
5. Consider waiting for or modifying this python interface latter to
   either directly use the (forthcoming) C interface or design the
   interface to have a similar structure and naming convention.
6. I looked (briefly) for a test suite but didn't find much. Could
   you please create a "test" directory that mimics the LLVM test
   directory so that "make check" will test out a few python programs
   that use the python interface to build working LLVM code.
7. Please submit gzipped, tar'd files with a ".tgz" suffix so that
   tar and gunzip can work on them without having to modify the
   file name (yes, this is a nit!)

Once you've got the above accomplished, we can create a repository for
the python interface and (with Oversight Group approval) give you cvs
write access to it. That will allow you to make changes and maintain the
python interface as LLVM grows without significant difficulty or burden.

We look forward to adding Python to LLVM!

Rei

On Sun, 2005-05-22 at 11:45 +0200, js.nospam at wolke7.net wrote:
> Hi,
> 
> I've updated the Python LLVM bindings for LLVM 1.5 (attached).  I also
> thought of setting up a CVS repository for this, but before I do that
> I thought I'd ask if you want to take the Python bindings to the main
> LLVM CVS?  I noticed that the C language bindings would be maintained
> there.
> 
> Changes in Python-LLVM:
> - Updated to match LLVM 1.5 API
> - Added Windows build support (created MSVC++ project file)
> - Added bindings for LLVM Transforms API 
> 
> Systems built on:
> - Linux 2.6.10 i686 (GCC 3.3.5)
> - Windows XP Home SP2 (MSVC++ 7.1)
> 
> As before, you'll need Boost.Python and Python to build the bindings.
> If you're interested, a previous version of the Python bindings was
> also sent to llvm-dev:
> http://mail.cs.uiuc.edu/pipermail/llvmdev/2005-February/003463.html
> 
> Cheers, Jarno
> 
> -- 
> 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
> +++ GMX - die erste Adresse fr Mail, Message, More +++
> _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev


More information about the Pypy-dev mailing list