DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master

Bug: 120848293
Change-Id: I4b14727a88dab59e88a62b5cec751e47a3e84637
tree: 693c3a9b063ea42a57fb27995f58ff91faff9369
  1. .clang-format
  2. .gitignore
  3. .travis.yml
  4. AUTHORS
  5. Android.bp
  6. CONTRIBUTING.md
  7. CONTRIBUTORS
  8. INTERNALS.md
  9. LICENSE
  10. Makefile
  11. Makefile.ckati
  12. Makefile.kati
  13. OWNERS
  14. README.md
  15. affinity.cc
  16. affinity.h
  17. ast.go
  18. bootstrap.go
  19. buf.go
  20. buf_test.go
  21. clang-format-check
  22. cmd/
  23. command.cc
  24. command.h
  25. dep.cc
  26. dep.go
  27. dep.h
  28. depgraph.go
  29. doc.go
  30. eval.cc
  31. eval.go
  32. eval.h
  33. evalcmd.go
  34. exec.cc
  35. exec.go
  36. exec.h
  37. expr.cc
  38. expr.go
  39. expr.h
  40. expr_test.go
  41. file.cc
  42. file.h
  43. file_cache.cc
  44. file_cache.h
  45. fileutil.cc
  46. fileutil.go
  47. fileutil.h
  48. fileutil_bench.cc
  49. find.cc
  50. find.h
  51. find_test.cc
  52. flags.cc
  53. flags.go
  54. flags.h
  55. func.cc
  56. func.go
  57. func.h
  58. func_test.go
  59. io.cc
  60. io.h
  61. loc.h
  62. log.cc
  63. log.go
  64. log.h
  65. m2n
  66. main.cc
  67. make-c.sh
  68. make-c/
  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. regen.cc
  82. regen.h
  83. regen_dump.cc
  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. testcase/
  112. testutil.h
  113. thread_local.h
  114. thread_pool.cc
  115. thread_pool.h
  116. timeutil.cc
  117. timeutil.h
  118. var.cc
  119. var.go
  120. var.h
  121. version.go
  122. version.h
  123. version_unknown.cc
  124. 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

For Android-N+, ckati and ninja is used automatically. There is a prebuilt checked in under prebuilts/build-tools that is used.

All Android's build commands (m, mmm, mmma, etc.) should just work.

How to use for Android (deprecated -- only for Android M or earlier)

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
% ./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