Merge remote-tracking branch 'aosp/upstream'

There are three feature changes

https://github.com/danw/kati/commit/0b544c58579cf2214d
https://github.com/google/kati/commit/348a960f31d42c63
https://github.com/google/kati/commit/422179d6ddbf649a

Other changes are minor performance optimizations. ~1.5x faster
ninja generation overall.

Bug: 27225198
Change-Id: I686cf4357a8c25c14ecbdbc75cedcd6db61eec7b
tree: cb2662f728c9eedcd378e6bffdfb437d8dd4d291
  1. cmd/
  2. make-c/
  3. testcase/
  4. .gitignore
  5. .travis.yml
  6. affinity.cc
  7. affinity.h
  8. Android.bp
  9. ast.go
  10. AUTHORS
  11. bootstrap.go
  12. buf.go
  13. buf_test.go
  14. command.cc
  15. command.h
  16. condvar.cc
  17. condvar.h
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. dep.cc
  21. dep.go
  22. dep.h
  23. depgraph.go
  24. doc.go
  25. eval.cc
  26. eval.go
  27. eval.h
  28. evalcmd.go
  29. exec.cc
  30. exec.go
  31. exec.h
  32. expr.cc
  33. expr.go
  34. expr.h
  35. expr_test.go
  36. file.cc
  37. file.h
  38. file_cache.cc
  39. file_cache.h
  40. fileutil.cc
  41. fileutil.go
  42. fileutil.h
  43. find.cc
  44. find.h
  45. find_test.cc
  46. flags.cc
  47. flags.go
  48. flags.h
  49. func.cc
  50. func.go
  51. func.h
  52. func_test.go
  53. INTERNALS.md
  54. io.cc
  55. io.h
  56. LICENSE
  57. loc.h
  58. log.cc
  59. log.go
  60. log.h
  61. m2n
  62. main.cc
  63. make-c.sh
  64. Makefile
  65. Makefile.ckati
  66. Makefile.kati
  67. mutex.cc
  68. mutex.h
  69. ninja.cc
  70. ninja.go
  71. ninja.h
  72. ninja_test.cc
  73. ninja_test.go
  74. pack.sh
  75. parser.cc
  76. parser.go
  77. parser.h
  78. pathutil.go
  79. pathutil_test.go
  80. query.go
  81. README.md
  82. regen.cc
  83. regen.h
  84. rule.cc
  85. rule.h
  86. rule_parser.go
  87. rule_parser_test.go
  88. runtest.rb
  89. serialize.go
  90. shellutil.go
  91. shellutil_test.go
  92. stats.cc
  93. stats.go
  94. stats.h
  95. stmt.cc
  96. stmt.h
  97. string_piece.cc
  98. string_piece.h
  99. string_piece_test.cc
  100. stringprintf.cc
  101. stringprintf.h
  102. strutil.cc
  103. strutil.go
  104. strutil.h
  105. strutil_bench.cc
  106. strutil_test.cc
  107. strutil_test.go
  108. symtab.cc
  109. symtab.go
  110. symtab.h
  111. testutil.h
  112. thread.cc
  113. thread.h
  114. thread_local.h
  115. thread_pool.cc
  116. thread_pool.h
  117. timeutil.cc
  118. timeutil.h
  119. var.cc
  120. var.go
  121. var.h
  122. version.go
  123. version.h
  124. version_unknown.cc
  125. worker.go
README.md

kati

Build Status

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.

How to use for Android

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.

How to use for Android (deprecated way)

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.

More usage examples (deprecated way)

“make clean”

% ./ninja.sh -t clean

Note ./ninja.sh passes all parameters to ninja.

Build a specific target

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