[go: up one dir, main page]

File: README.rst

package info (click to toggle)
llvm-py 0.12.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,596 kB
  • ctags: 5,378
  • sloc: python: 16,884; cpp: 1,917; makefile: 209; ansic: 177; pascal: 87; sh: 8
file content (70 lines) | stat: -rw-r--r-- 2,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
================================
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 install`` to build and install.

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

    **Note**: Use ``make -j2 install`` to enable concurrent build.
    Replace ``2`` with the actual number of processor you have.

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.

2. *LLVM3.3 ssize_t mismatch on 64-bit Windows.*
   Get patch from http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130701/180049.html

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.