问题
What toolchain used by default when compile through Android.mk ? And how change the toolchain ?
回答1:
The default toolchain was gcc-4.6 for a long time. It has changed to gcc-4.8 in the NDK r10d version (currently the latest version).
You can choose to use another toolchain through modifying the NDK_TOOLCHAIN_VERSION
variable, throughndk-build
call (example: ndk-build NDK_TOOLCHAIN_VERSION=clang3.4
, or by setting it inside Application.mk file. Example:
NDK_TOOLCHAIN_VERSION := clang3.4
来源:https://stackoverflow.com/questions/29396637/android-mk-what-toolchain-used-by-default