【问题标题】:Can I build LLVM without having Python interpreter?我可以在没有 Python 解释器的情况下构建 LLVM 吗?
【发布时间】:2017-03-07 21:29:14
【问题描述】:

当构建 LLVM cmake 配置失败时,它找不到 Python 解释器。据我了解,运行 LLVM 测试需要 Python。我对测试 LLVM 不感兴趣,我的配置中明确禁用了测试。在这种情况下是否可以强制 cmake 不需要 Python?

【问题讨论】:

  • 我记得 LLVM 使用 Python 生成库依赖文件,所以没有 Python 就无法构建。我怀疑这已经改变了。

标签: build cmake llvm


【解决方案1】:

目前无法在没有 Python 的情况下构建 LLVM。 LLVM 配置使用llvm-build Python 脚本生成一些附加文件。

【讨论】:

    【解决方案2】:

    我会尝试将LLVM_INCLUDE_TESTS=NO 传递给cmake 命令:

    LLVM_INCLUDE_TESTS:BOOL
        Generate build targets for the LLVM unit tests. Defaults to ON. You can use this option to disable the generation of build targets for the LLVM unit tests.
    

    请参阅 LLVM 文档:LLVM-specific variables

    【讨论】:

    • 然后,很明显,我会在 LLVM 的 CMakeLists 文件中寻找需要 Python 的地方,看看它是否依赖于某些可能被关闭的标志。但你可能也去过那里。非常肮脏的 hack 可能是创建你的虚拟“python”bash 脚本 - 并将 LLVM 指向它,这样它就不会阻止你。
    猜你喜欢
    • 2016-03-04
    • 1970-01-01
    • 1970-01-01
    • 2011-06-30
    • 1970-01-01
    • 1970-01-01
    • 2015-08-27
    • 2015-08-29
    • 1970-01-01
    相关资源
    最近更新 更多