Is it possible to compile LLVM libraries to android/ARM

后端 未结 5 399
长发绾君心
长发绾君心 2021-02-02 11:50

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 o

5条回答
  •  盖世英雄少女心
    2021-02-02 12:12

    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.

提交回复
热议问题