GithubHelp home page GithubHelp logo

cantora / llvmpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from llvmpy/llvmpy

0.0 2.0 0.0 4.25 MB

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.

Home Page: www.llvmpy.org

License: BSD 3-Clause "New" or "Revised" License

Shell 0.04% Python 91.14% C 2.31% C++ 4.39% JavaScript 0.52% CSS 1.60%

llvmpy's Introduction

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. 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 [email protected]: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.

llvmpy's People

Contributors

sklam avatar ilanschnell avatar teoliphant avatar maggie-m avatar markflorisson avatar mwiebe avatar pfalcon avatar laanwj avatar hgrecco avatar majidaldo avatar bfroehle avatar jszakmeister avatar takluyver avatar dand-oss avatar cgohlke avatar davipo avatar ehiggs avatar jayvius avatar npinto avatar cpcloud avatar sergiopasra avatar valtron avatar 0x0l avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.