是否有可能编译LLVM库到Android / ARM [英] Is it possible to compile LLVM libraries to android/ARM

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

问题描述

我迷上了纯代数/函数式语言。纯跨preTER使用LLVM的JIT编译器作为其后端。

我想编译纯,使其运行在Android(ARM )。纯对LLVM JIT的依赖。所以,我需要编译LLVM源纯净运行。<​​/ P>

是否有可能LLVM编译为Android(ARM)的设备?似乎正在成为这个在网络上的任何信息。也许我的搜索词是错误的。搜索Android的LLVM不会带来了许多很好的命中无论是。

解决方案

现在看来可能,NDK现在支持锵它使用LLVM。因此,也许它可以制成任何LLVM语言进行工作。 AOSP应该给我们就如何增加锵支持一些见解。查看最新的Andr​​oid NDK的详细信息上锵支持。

  

的Andr​​oid NDK,修订8C(2012年11月)
  重要的变化:
  增加了锵3.1编译器的NDK。 GNU编译器集合(GCC)4.6仍然是默认的,所以你必须明确将启用锵编译器选项:
  对于NDK建造,出口NDK_TOOLCHAIN​​_VERSION = clang3.1或添加这个环境变量设置,以Application.mk。
  对于独立的版本,添加--llvm版本= 3.1 make-standalone-toolchain.sh和替换CC和CXX在Makefile与/ bin中/铛和/ bin中/铛++。见STANDALONE-TOOLCHAIN​​.html了解详细信息。
  注:此功能是实验性的。请您尝试一下,并报告任何问题。

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

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.

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.

解决方案

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, 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天全站免登陆