Search code examples
androidandroid-ndktoolchain

Android.mk - what toolchain used by default?


What toolchain used by default when compile through Android.mk ? And how change the toolchain ?


Solution

  • 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