commit | 439f6f1553ad197b7c6921b28f848456cfb50ea9 | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Wed Oct 19 01:13:54 2016 -0700 |
committer | Dan Willemsen <dwillemsen@google.com> | Wed Oct 19 15:18:22 2016 -0700 |
tree | e745c148c010fee46253f57056ceefb7820751d4 | |
parent | 8543327654443db1981142bbe18f3878e464e981 [diff] |
Optimize findleaves regen check If we've found all possible files in a leaf directory, we don't need to re-run findleaves every time the leaf directory's timestamp changes, we just need to make sure the file(s) that we found still exist. This saves a few seconds every time an atomic write is done in a source directory next to an Android.mk file. (Atomic writes use renames, so they always change the directory's timestamp) With the last commit that finds out/Android.mk and out/CleanSpec.mk, it turns out that the output directory's timestamp was changing every build, causing the global Android.mk & CleanSpec.mk findleaves.py command to be executed every regen check. TEST_FIND_EMULATOR still passes after this change.
kati is an experimental GNU make clone. The main goal of this tool is to speed-up incremental build of Android.
Currently, kati does not offer a faster build by itself. It instead converts your Makefile to a ninja file.
Now AOSP has kati and ninja, so all you have to do is
% export USE_NINJA=true
All Android's build commands (m, mmm, mmma, etc.) should just work.
Set up kati:
% cd ~/src % git clone https://github.com/google/kati % cd kati % make
Build Android:
% cd <android-directory> % source build/envsetup.sh % lunch <your-choice> % ~/src/kati/m2n --kati_stats # Use --goma if you are a Googler. % ./ninja.sh
You need ninja in your $PATH.
% ./ninja.sh -t clean
Note ./ninja.sh passes all parameters to ninja.
For example, the following is equivalent to "make cts":
% ./ninja.sh cts
Or, if you know the path you want, you can do:
% ./ninja.sh out/host/linux-x86/bin/adb