commit | 19edaf13a3b6997a63273047130c0340e220b10e | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Wed Jan 06 17:43:58 2016 -0800 |
committer | Dan Willemsen <dwillemsen@google.com> | Wed Jan 13 12:34:44 2016 -0800 |
tree | 5a135e9d3fcb49cc6167334dfe91ea2a33cda2e4 | |
parent | 347e06f1469dd5eb403cd5a7e608f705cfcecd19 [diff] |
Allow building Kati with Soong for Android Currently, Android sets some cflags and uses make to build kati. This still uses some of the system headers and libraries instead of the hermetic ones in the tree. Kati and makeparallel are the two remaining binaries being built outside of ninja. In order to fix all of these, define an Android.bp file for Soong, then when enabled, Android will ask Soong to build kati instead of including Makefile.ckati. And I'm hardcoding the version to unknown for now, Soong's genrule is not yet flexible enough to handle the optional dependency.
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