Originally a github fork of the llvm-py repository from http://www.mdevan.org/llvm-py/index.html updated to work with LLVM 3.x. Since then it has changed significantly with multiple sub-projects. www.llvmpy.org
Find a file
anthony cantor 818c9289fc implemented binding for MCDisassembler.getInstruction
also added new llvm.mc module to act as higher level
python access to the MC section of LLVM (added Instr
and Disassembler classes).
2013-09-18 11:52:20 -05:00
buildscripts/condarecipe remove chrpath 2013-08-16 11:50:38 -05:00
docs Update docs 2013-04-25 14:10:57 -05:00
llpython Remove shebangs from library code 2013-09-09 13:00:01 +02:00
llrtc add div64 and mod64 2013-08-14 17:24:34 -05:00
llvm implemented binding for MCDisassembler.getInstruction 2013-09-18 11:52:20 -05:00
llvm_array fix future import 2013-05-31 11:47:51 -05:00
llvm_cbuilder Support non-inplace versions of bitwise left and right shift, and, or and xor 2013-03-14 15:21:14 +00:00
llvmpy implemented binding for MCDisassembler.getInstruction 2013-09-18 11:52:20 -05:00
test implemented binding for MCDisassembler.getInstruction 2013-09-18 11:52:20 -05:00
tools add NVPTX for LLVM 3.2; 2012-08-18 15:29:26 -07:00
www cleanup 2013-01-31 17:54:20 -06:00
.gitattributes add missing llvm/_version.py 2013-02-01 16:04:58 -06:00
.gitignore Finished wrapper in llvm.core 2013-02-08 18:13:45 -06:00
.travis.yml Changed test command for travis 2013-03-04 23:37:28 -03:00
CHANGELOG update change log 2013-08-28 17:11:03 -05:00
LICENSE Update license and README 2012-08-02 02:46:10 -05:00
llvm-config-win32.py update marker header file 2013-08-06 14:17:14 -05:00
MANIFEST.in Issue #34 - Add tools to MANIFEST.in 2012-12-30 21:08:38 +00:00
README.rst More detail 2013-04-08 11:28:42 -05:00
README_LLVM_CBUILDER.md Add Stephen's llvm-cbuilder examples. 2012-12-17 14:12:48 -06:00
setup.py added Target.createMCSubtargetInfo and createMCDisassembler 2013-09-18 11:52:20 -05:00
versioneer.py add versioneer 2013-02-01 15:55:12 -06:00

================================
llvmpy: Python bindings for LLVM
================================

Home page
---------

http://www.llvmpy.org

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 <http://llvm.org/releases/download.html#3.2>`_.  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.