Here's a simple method to configure the Python interpreter to use LLVM as the default C compiler.

So far, the process is relatively simple, and only involves configuring the Python interpreter with the llvm-gcc binary.

For example, to enable LLVM at configure time, and compile all C extensions with llvm-gcc, run

$ cd python-2.6.5
$ ./configure --prefix=/usr/local --with-fpectl --with-system-ffi --enable-unicode=ucs4 --with-threads --without-pymalloc CC=llvm-gcc
$ make && sudo make install

To print out the current version of the LLVM compiler suite

erob@localhost:~/notmm-0.3-maint$ llvm-config --version

See also

Building the LLVM GCC Front-End from Source:

just another Wiki: PythonOnLLVM (last edited 2010-05-10 18:20:55 by anonymous)