android - 是否可以将 LLVM 库编译为 android/ARM

标签 android arm llvm cross-compiling

我对 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/

相关文章:

c++ - 使用 CMAKE 编译 C++ 文件(无法识别 '-rdynamic')

python - numba/npyufunc/omppool.cpp :5:10: fatal error: 'omp.h' file not found

java - 在android中的Socket通信中写入十六进制字符串

Android AudioTrack 无法初始化

java - 在 java 中创建样式 xml 以供查看(按钮)

assembly - 反汇编时如何对二进制arm指令进行分类

c - ARM 上的 double2unsigned(vcvt 指令)

java - 安卓OpenGL ES 2.0 : Text aren't showing up

c - 编译器什么时候会为x86_64生成C语言的间接跳转?我们可以告诉编译器禁用生成间接跳转吗?

objective-c - 是否可以编译更新版本的 LLVM 并将其与 Xcode 一起使用?