Can LLVM IR (intermediate view) be used to create cross-platform (iphone and Android) ARM executables?

I am considering possible ways to effectively create the target Android and iPhone application from the same code base, whether in C / C ++ / C # / Objective-C or Java (using VMKit).

LLVM looks promising, but I got a little confused about compatibility with various ARM CPU implementations, mainly in terms of how the graphic and sound code are “resolved” by the basic chipsets (ie should I encode specific ARM chipsets, or will higher level API, like OpenGL?).

I am a little versed in various Cross Dev products (e.g. Airplay SDK, MoSync (GPL-GCC), Unity3d, XMLVM, etc.), but what I really would like to do is either write in Java or use C / C ++, emit LLVM IR and create compatible ARM executables, if possible.

Sorry if any of the above is fuzzy.

thank

Rich

+3
source share
3 answers

. , . , Android api, iPhone api. , .

LLVM IR , :

int a,b;

a=7;
b=a-4;

IR, IR .

, , , , , , IR C api, , C IR .

+3

LLVM , , , .

LLVM IR " " , , . , , -, , .

, ( Cocoa/VMKit), , , /

+3

OS, , ARM. ( IO) API-, , . API, , Unity, et. .

LLVM ARM (armv6, armv7, fp ..), , IO, .

+2
source

Source: https://habr.com/ru/post/1781995/


All Articles