The Android NDK was once compiled, during that compilation a different compiler was used running inĪ build platform (maybe Windows) to generate the actual Android NDK that will run in the host.To generate binaries for Android (the host platform). The Android NDK is a cross compiler to Android: it can be executed in Linux (the build platform).Let’s illustrate these scenarios with some examples:
If the build platform is also different, it is called Canadian Cross. The host platform (where the cross compiler will run) has to be different from the target platform. The target is the platform the compiler will generate binaries for: in order to be a cross compiler The target platform plays an important role when compiling a cross compiler, in that scenario Cross building: when the build and the host platform are different, it requiresĪ cross compiler running in the build platform that generates binaries for the host platform.That the platform where the compiler is running is the same one where the generated binaries will run. Native building: when the build and the host platforms are the same, it means.Target platform: Only when building a cross compiler, it is the platform it will generate binaries for.ĭepending on the values of these platforms, there are different scenarios:.Host platform: The platform on which the generated binaries will run.Build platform: The platform on which the compilation tools are being executed.According to the GNU convention, there are three platforms involved in the software building: