Android的NDK - 它支持直臂code或只是拇指拇指、Android、NDK、code

2023-09-05 09:08:02 作者:  固执的7-Ⅱ▼

所有,

我被要求评估Android平台为我们的产品,我期待在各种选择,我只是只是表面刚才的一件事,是困扰我的是,我看不到如何编译code直ARM code(没有Thumb),我知道,拇指运行速度较慢,我们需要在我们的code关键部分的性能。

I have been asked to evaluate the Android platform for our product and I am looking at various options, I am only just scratching the surface just now and the one thing that is bothering me is that I cannot see how to compile code as straight ARM code (no Thumb), I know that Thumb runs slower and we will need the performance in key sections of our code.

我的认为的它应该只设置-march标志的Andr​​oid.mk文件的LOCAL_CFLAGS,但我不能得到那个工作...

I think it should just be setting the -march flag in the LOCAL_CFLAGS of the Android.mk file, but I cannot get that to work...

谁能帮助。

拉​​塞尔

推荐答案

指定下列标志中的Andr​​oid.mk模块将直接编译ARM code。

Specifying the following flag for a module in Android.mk will compile straight ARM code.

LOCAL_ARM_MODE:=手臂

LOCAL_ARM_MODE := arm

启用优化还可以帮助:

LOCAL_CFLAGS:= -O3

LOCAL_CFLAGS := -O3