是否可以将 LLVM 库编译为 android/ARM [英] Is it possible to compile LLVM libraries to android/ARM

查看:47
本文介绍了是否可以将 LLVM 库编译为 android/ARM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我着迷于纯代数/函数式语言.Pure 解释器使用 LLVM JIT 编译器作为其后端.

I'm fascinated by the Pure algebraic/functional language. The Pure interpreter uses the LLVM JIT compiler as its backend.

我想编译 Pure以便它在Android上运行(手臂).Pure 依赖于 LLVM JIT.所以我需要为 Pure 编译 LLVM 源代码才能运行.

I would like to compile Pure so that it runs on Android(ARM). Pure has a dependency on the LLVM JIT. So I need to compile LLVM source for Pure to run.

是否可以为 Android (ARM) 设备编译 LLVM source?网上好像真的没有这方面的信息.也许我的搜索词是错误的.搜索 Android LLVM 也没有带来很多好的点击.

Is it possible to compile LLVM source for Android (ARM) devices? There really seems to be no information about this on the web. Maybe my search terms are wrong. Searching for Android LLVM does not bring up many good hits either.

推荐答案

现在看来可能,NDK 现在支持使用 LLVM 的 Clang.所以也许它可以与任何 LLVM 语言一起工作.AOSP 应该让我们深入了解他们如何添加 Clang 支持.有关 Clang 支持的详细信息,请参阅最新的 Android NDK.

It now seems possible, the NDK now supports Clang which uses LLVM. So maybe it can be made to work with any LLVM language. AOSP should give us some insight on how they added Clang support. See the latest Android NDK for details on Clang support.

Android NDK,修订版 8c(2012 年 11 月)
重要变化:
向 NDK 添加了 Clang 3.1 编译器.GNU Compiler Collection (GCC) 4.6 仍然是默认版本,因此您必须明确启用 Clang 编译器选项,如下所示:
对于 ndk-build,导出 NDK_TOOLCHAIN_VERSION=clang3.1 或将此环境变量设置添加到 Application.mk.
对于独立构建,将 --llvm-version=3.1 添加到 make-standalone-toolchain.sh 并用/bin/clang 和/bin/clang++ 替换 makefile 中的 CC 和 CXX.有关详细信息,请参阅 STANDALONE-TOOLCHAIN.html.
注意:此功能是实验性的.请尝试并报告任何问题.

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.

这篇关于是否可以将 LLVM 库编译为 android/ARM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆