On October 28, 2015 at 2:43:51 PM, Colin Cross (ccr...@android.com) wrote:
AOSP master platform builds now build with ninja instead of GNU make.
The build/core makefiles and Android.mk files are read by kati
(https://github.com/google/kati/blob/master/README.md), which will
interpret them and write out a $OUT_DIR/build_$(TARGET_PRODUCT).ninja
file, and then the execution of the build rules will be handled by
ninja (https://martine.github.io/ninja/).
Building with kati and ninja provides some immediate benefits:
1. Faster startup time for new builds. Running kati and then ninja
results in builds starting about 25% faster than GNU make.
2. Much faster incremental builds. kati caches the mtimes of files
and directories it read, what environment variables it used, etc., and
only re-reads all the makefiles if something has changed. This
includes globs like $(call all-files-under). Incremental builds with
a warm disk cache will start within 5 seconds.
3. Better build command output. Ninja buffers the output of each
command and prints it without mixing output from multiple commands,
meaning error messages will be printed as a group after a build
failure, and not mixed with other concurrent build output. Ninja also
prints a configurable status line that defaults to printing the
percentage of build commands that have been run, the number that have
been run, and the number that need to run, giving a reasonable
approximation of the progress through the build.
4. Incremental builds should be more reliable. Ninja considers
outputs whose command line has changed to be dirty, which will catch
changes to global cflags, etc. and rebuild anything that has changed.
The use of ninja should be transparent, it is wrapped by the top level
Makefile, so all make-based commands should continue to work.
These changes are a precursor to a much larger change that will
replace all the Android.mk files with data files using a format that
provides much better error checking, even faster builds, and 100%
reliable incremental builds.
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.
To post to this group, send email to android-...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.
Colin -Is Ninja also used at all in the 6.0.0_r1 build branches? The build times on those branches also seem to be considerably faster over previous versions.
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platform+unsubscribe@googlegroups.com.
To post to this group, send email to android-platform@googlegroups.com.
Visit this group at http://groups.google.com/group/android-platform.
For more options, visit https://groups.google.com/d/optout.