问题描述
我使用Android studio 1.5.1与NDK修订版11,宣布NDK中的GCC现在已废弃,赞成Clang。
I am using Android studio 1.5.1 with NDK Revision 11 that declared that GCC in the NDK is now deprecated in favor of Clang.
我需要在clang和gcc之间切换和自定义标志,但是,应用程序的配置和使用Android.mk和Application.mk在他们之间切换的方法似乎
I need to switch between clang and gcc and customize flags, However, the application's configuration and the method of using Android.mk and Application.mk to switch between them seems to be changed!
推荐答案
您可以将环境变量 $ CC
更改为一个指向clang二进制或您可以使用 $ NDK_HOME / build / tools / make-standalone-toolchain.sh
You can change your environment variable $CC
to one that point to clang binary or you can use the script from $NDK_HOME/build/tools/make-standalone-toolchain.sh
您可以使用 - help
param运行此脚本以查看所有有效选项。
You can run this script with the --help
param to view all valid options.
参考:
这篇关于如何在gcc和clang之间切换在Android NDK版本11?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!