commit | 0335e0900d8ad9f44b2445d58f35ba59bb915040 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Thu Jan 21 15:26:21 2021 -0800 |
committer | Colin Cross <ccross@android.com> | Thu Jan 21 22:02:30 2021 -0800 |
tree | 4ce10f39343387a86c6bcc19bae27a14317cfb88 | |
parent | bcd5686660315df6ee5540a2d8647ddf6123545a [diff] |
Use io.StringWriter in ninjaWriter ninjaWriter repeatedly called io.WriteString() on its writer, which does a type assertion every time. Replace its io.Writer with an io.StringWriter and call WriteString on it directly. Test: ninja_writer_test.go Change-Id: Ie073d996a319190242bf6a00af07a13a60d078b5
Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a Ninja manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files.