Skip to main content

Python bindings for LLVM

Project description

Versions

This package has been tested with LLVM 3.2, Python 2.6, 2.7 and 3.3. Other Python versions may work.

Quickstart

  1. Get and extract LLVM 3.2 source tarball from llvm.org. Then, cd into the extracted directory.

  2. Run ./configure --enable-optimized --prefix=LLVM_INSTALL_PATH.

    Note: Without the --enable-optimized flag, debug build will be selected. Unless you are developing LLVM or llvmpy, it is recommended that the flag is used to reduce build time and binary size.

    Note: Use prefix to select the installation path. It is recommended to separate your custom build from the default system package. Please replace LLVM_INSTALL_PATH with your own path.

  3. Run REQUIRES_RTTI=1 make to build.

    Note: With LLVM 3.2, the default build configuration has C++ RTTI disabled. However, llvmpy requires RTTI.

  4. Get llvm-py and install it:

    $ git clone git@github.com:llvmpy/llvmpy.git
    $ cd llvmpy
    $ LLVM_CONFIG_PATH=LLVM_INSTALL_PATH/bin/llvm-config python setup.py install
    

    Run the tests:

    $ python -c "import llvm; llvm.test()"
    
  5. See documentation at ‘http://www.llvmpy.org’ and examples under ‘test’.

Common Build Problems

  1. If llvmpy cannot be imported due to “undefined symbol: _ZTIN4llvm24PassRegistrationListenerE”, it is because RTTI is not enabled when building LLVM. “_ZTIN4llvm24PassRegistrationListenerE” is the typeinfo of PassRegistrationListener class.

LICENSE

llvmpy is distributed under the new BSD license, which is similar to the LLVM license itself. See the file called LICENSE for the full license text.

Project details


Release history Release notifications

History Node

0.12.7-9-g60b512d

History Node

0.12.7

History Node

0.12.6

This version
History Node

0.12.5

History Node

0.12.4

History Node

0.11.2

History Node

0.11.0

History Node

0.10.2

History Node

0.10.1

History Node

0.10.0

History Node

0.9

History Node

0.8.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
llvmpy-0.12.5.tar.gz (659.4 kB) Copy SHA256 hash SHA256 Source None May 5, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page