commit | 40e5a3d454cfc6b875fffb7fa0c416620d5526fe | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Fri Sep 16 19:35:32 2016 -0700 |
committer | Dan Willemsen <dwillemsen@google.com> | Mon Sep 19 15:38:34 2016 -0700 |
tree | 7bf3334c72a4967273f509cdd93a83fa647af389 | |
parent | d26caadec345d7f19d63f894a0b8320693543ea6 [diff] |
Don't ignore all date/echo commands echo commands may have side-effects (writing a file), or be testing a condition and echoing a different value. date commands may be part of a larger command as well. In any case, if the command changes, and would cause changes to the ninja file, then we want to regenerate the ninja file. Just whitelist `date +%s` for now, since Android uses that as its only build-time date source, and we don't want to rebuild the ninja file every time for that. Eventually, it should be removed, but that means removing all makefile choices on BUILD_NUMBER, since that depends on BUILD_DATETIME as well. In either case, the real value should never be inserted into the ninja file. Change-Id: I3b36c8b46f747c1b22a3faacf1fc34683faa9b70
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