The NDK has done this in `build/core/definitions.mk` since r13 (r12 and below do so only for c++_static).