commit | f63a3fd971eb9d2a8440237a9191cf2ed22697f5 | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Thu Apr 27 23:39:57 2017 -0700 |
committer | Dan Willemsen <dwillemsen@google.com> | Mon May 22 21:22:46 2017 -0700 |
tree | fd2ee906ecdba73a18687e1dc23f3e6eceb92be0 | |
parent | 96e3c407c473f09a727615c4a83fe0e9c11a6b11 [diff] |
Add --werror_find_emulator, --werror_overriding_commands For Android builds, we'd like to start removing some of the default warnings and turn them into errors so that they can't come back. For find emulator, we could attempt to check for errors, or silence every find command in the tree, but that doesn't particularly scale, especially when new code gets added with warnings. We've gone through and fixed many of these, but they keep coming back, so add --werror_find_emulator so that when we fix them all we can prevent them from coming back. Overriding commands is similar -- we really don't want multiple rules defining a single output file. In ninja we've turned on -w dupbuild=err, but if the paths happen to be identical the makefile overriding logic kicks in first and presents a warning instead of an error. So add --werror_overriding_commands in order to turn the make warning into an error.
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