[英]Using vanilla GCC (or Clang) with android NDK
Android-NDK ships its own compiler to build the native code. Android-NDK附带自己的编译器来构建本机代码。 The version shipped with my current android-NDK installation is arm-linux-androideabi-g++ (GCC) 4.6.x-google 20120106 (prerelease)
, I guess it's a fork of GCC 4.6. 我当前的android-NDK安装附带的版本是arm-linux-androideabi-g++ (GCC) 4.6.x-google 20120106 (prerelease)
,我猜它是GCC 4.6的一个分支。
What are the differences between it and a regular (vanilla) GCC 4.6? 它和普通(香草)GCC 4.6有什么区别? Is it producing better code for ARM platforms? 它是否为ARM平台生成更好的代码?
I'd like to use other compilers to build software for android, like vanilla GCC 4.7 or Clang, since they have a better support of C++11 and implement some features I'm struggling to use (like template aliases). 我想使用其他编译器为android构建软件,如vanilla GCC 4.7或Clang,因为他们对C ++ 11有更好的支持并实现了我正在努力使用的一些功能(比如模板别名)。
Is it possible to use the latest vanilla GCC or Clang, to build the native code for Android? 是否可以使用最新的香草GCC或Clang来构建Android的本机代码? What parameters should I use? 我应该使用什么参数?
What are the cons of using a compiler different from the one shipped with android-SDK? 使用与android-SDK附带的编译器不同的编译器有什么缺点?
Android GCC is customized for the android as all the features in the GCC are not supported by the native Android. Android GCC是为Android定制的,因为原生Android不支持GCC中的所有功能。 I dont think there is a possibility, you can post the same in the android ndk google groups where your answers will be replied by the Google Android Developers. 我不认为有可能,你可以在Android ndk google小组中发布相同内容,Google Android开发者会回答你的答案。
They were suggesting that we can make use of the cross compilers for compiling the android code with out using the android ndk. 他们建议我们可以利用交叉编译器来编译android代码而不使用android ndk。
Just a heads-up: google added clang3.1 in Revision 8c of the Android NDK. 只是一个单挑:谷歌在Android NDK的修订版8c中添加了clang3.1。 It's in "experimental" stage now, but easy to try out (and probably will be better supported in the near future, hopefully with a proper port of libc++, too). 它现在处于“实验性”阶段,但很容易尝试(并且可能在不久的将来会得到更好的支持,希望有一个适当的libc ++端口)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.