我对 Pure algebraic/functional language 很着迷. Pure 解释器使用 LLVM JIT 编译器作为其后端。
我想compile纯,以便它在 Android(ARM) 上运行。 Pure 依赖于 LLVM JIT。所以我需要为 Pure 编译 LLVM 源代码才能运行。
是否可以编译 LLVM source适用于 Android (ARM) 设备?网上似乎真的没有这方面的信息。也许我的搜索词是错误的。搜索 Android LLVM 也不会带来很多好结果。
最佳答案
现在看来可能,NDK 现在支持使用 LLVM 的 Clang。所以也许它可以与任何 LLVM 语言一起使用。 AOSP 应该让我们了解他们如何添加 Clang 支持。查看最新的 Android NDK 以获得 details关于 Clang 支持。
Android NDK, Revision 8c (November 2012)
Important changes:
Added the Clang 3.1 compiler to the NDK. The GNU Compiler Collection (GCC) 4.6 is still the default, so you must explicitly enable the Clang compiler option as follows:
For ndk-build, export NDK_TOOLCHAIN_VERSION=clang3.1 or add this environment variable setting to Application.mk.
For standalone builds, add --llvm-version=3.1 to make-standalone-toolchain.sh and replace CC and CXX in your makefile with /bin/clang and /bin/clang++. See STANDALONE-TOOLCHAIN.html for details.
Note: This feature is experimental. Please try it and report any issues.
关于android - 是否可以将 LLVM 库编译为 android/ARM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6665966/