llvm的python绑定

llvmp的Python项目详细描述


版本

这个包已经用llvm 3.3、python 2.6、2.7、3.3和3.4进行了测试。 其他python版本也可以工作。

快速启动

  1. 从中获取并提取llvm 3.2源tarball llvm.org。然后,cd进入 提取的目录。

  2. 运行./configure --enable-optimized--prefix=LLVM_INSTALL_PATH

    Note: Without the ^{tt3}$ 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 ^{tt4}$ with your own path.

  3. 运行REQUIRES_RTTI=1 make install生成并安装。

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

    Note: Use ^{tt6}$ to enable concurrent build. Replace ^{tt7}$ with the actual number of processor you have.

  4. 获取llvm py并安装它:

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

    运行测试:

    $ python -c "import llvm; llvm.test()"
    
  5. 请参阅http://www.llvmpy.org中的文档和示例 在“测试”下。

常见的构建问题

  1. 如果由于“未定义的符号: _ ztin4llvm24passregistrationlistenere“,这是因为没有启用rtti 在构建llvm时。“ztin4llvm24passregistrationlistenere”是类型信息 PassRegistrationListener类的。
  2. llvm3.3 ssize\u t在64位窗口上不匹配。http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130701/180049.html
  3. 获取修补程序
  4. OSX 10.9 Mavericks默认使用libc++但Anaconda分发llvm 二进制文件链接到旧的libstdc++。这两个二进制文件不兼容 但是没有编译/链接时间警告。产生的二进制文件可能 在运行时生成分段错误(可能是由于ABI不匹配)。 修复:使用以下C++标志: -std=libstdc++-mmacosx-version-min=10.6

许可证

llvmpy是在新的bsd许可证下发布的,它类似于llvm 许可证本身。 请参阅名为license的文件以获取完整的许可文本。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java将Int值传递给另一个类   在使用Sdin(或非交互式)输入| Java时调试奇怪的输入错误   java返回一个文本字符串作为响应struts2   java为什么我们不能在声明局部变量之前初始化它呢?   java从现有XML中读取值并将其填充到Json中   java Spring Boot+Maven:找不到repositoryFactoryBean   java使用regex表示“W o.Rd”。replaceAll(“单词”、“替换”)   java Sub resorce在Jersey REST API框架中不起作用   java在组件启动时,当所述报告存储在Sharepoint中时,是否可以加载预格式化的WebDataRocks报告?   java并发更新列表的最佳方法   servlets Java web应用程序对象调度   应用程序在点击按钮时崩溃,Android Studio(Java)   java如何为掷骰子游戏调用另一个类中的方法?