commit | 6c92af937e56f84febe62d42bc10f71f1b5c5457 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Fri Sep 28 16:15:58 2018 -0700 |
committer | Colin Cross <ccross@android.com> | Tue Oct 02 21:52:50 2018 -0700 |
tree | 0f8713a6e36ad7afc62a12a707c76975d6e0f9eb | |
parent | c54f732470c40e79b3e1151c24936acdd787eca0 [diff] |
Enable restat for go binaries Many Android build tools are written in go, and changes to Soong or Blueprint can cause them to rebuild. Almost everything in an Android build is downstream of at least one of these tools, so they all rebuild too. Go binaries are static, so their contents will always change if any of their dependencies change. Only update output files of go compile and go link if the contents change, and enable restat for the rules. Test: m soong_zip && m soong_zip Test: m soong_zip && touch build/soong/zip/cmd/main.go && m soong_zip Change-Id: I9267580f644b42b44d43fb0a2674dc5234f127e5
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.