commit | 00890dd8f62580eb216d81b2ea02e5d5d61dc203 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Thu Jan 21 15:29:16 2021 -0800 |
committer | Colin Cross <ccross@android.com> | Thu Jan 21 22:02:30 2021 -0800 |
tree | de4fe0d3da8bbb43e100f02f3194116039a1b24c | |
parent | c8b9e552895468f2eb39b73c6f1ec918920c5d62 [diff] |
Optimize arg parsing in buildDef.WriteTo Arguments to build definitions were copied from the input map to an map with the name and value expanded, then to a list of names for sorting, and then written, which required iterating over a map three times. Expand the name and value into a list of name value pairs, and then do the rest of the operations on the list instead. Test: ninja_writer_test.go Change-Id: Id8ff644dafbaa3b4812747c60dc28cce22e21dbe
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.