Android 7.0 (nougat) compilation optimization-ninja

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.