http://blog.csdn.net/songjam/article/details/52640501
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
From the official definition, NINJA significantly shortened the Android system's compilation cycle, Android 7.0 is already default on the nougat, disable the way: Export Use_ninja = False
From Build/core/main.mk, ninja to perform two times MAIN.MK scan, the first time to perform the import of Android environment and product basic configuration information, but do not scan android.mk; Define Building_with_ninja Reload main.mk All definitions on second scan
Because of these small changes, resulting in Droid,droidcore two target in the first scan can not rely on the module, that is, android.mk in the local_module, otherwise ninja execution failed. The scanning phase can be judged using Building_with_ninja:
Ifndef Building_with_ninja
#first phrase
Else
#second phrase
endif
In addition, Ninja's handling of cyclic dependencies is not a simple drop-off dependency, but a direct error exit, requiring careful writing of makefile rules
Android 7.0 (nougat) compilation optimization-ninja