Merged requested to merge brad.king/cmake:android-ndk-legacy-toolchain into master
Since !5862 (merged) this variable has been provided when using CMake's NDK support or the modern NDK toolchain file, and needed in our compiler/platform information files. Provide it when using the NDK legacy toolchain file too.
Revert !7689 (merged) since the variable should now always be defined.
Issue: #21772 (closed)
Fixes: #24386 (closed)