commit | a4bb77402230bcd3f296dbdccc1d4cda66d52a14 | [log] [tgz] |
---|---|---|
author | Shinichiro Hamaji <[email protected]> | Fri Jul 31 11:27:30 2015 +0900 |
committer | Shinichiro Hamaji <[email protected]> | Fri Jul 31 11:52:11 2015 +0900 |
tree | 87b42d0d55f80241d31e14329ad09d7d6fd000e9 | |
parent | b58bb4b2c8df6984ff64db21e8bbad928d2fd33e [diff] |
[C++] Update ninja file only when necessary As this feature is incomplete, this is enabled only with --regen flag. I decided not to use ninja's "generator" feature because we cannot create appropriate regeneration rules for globs in Android. There are some directory names which are also used as target names (e.g., "cts"). Ninja tries to build such targets to check if regeneration is necessary.
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.
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
% ~/src/kati/m2n -j10 % ./ninja.sh
Or
% ./ninja.sh -j10
Note the latter kills the parallelism of goma.