commit | 910242b9a6d512187b22b3a38f71fb7b158e2174 | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Mon Apr 11 15:41:52 2016 -0700 |
committer | Colin Cross <ccross@android.com> | Tue Apr 12 14:52:46 2016 -0700 |
tree | 6056cd4ffa3a011577a160545ed1c35bda47a100 | |
parent | 97f6b9b61d01c9feca29ac4cf61624372aab5c98 [diff] |
Clone all modules between mutators and GenerateBuildActions A common pattern in mutators is to set a property on a module to be used later in GenerateBuildActions. A common anti-pattern is to set a member variable instead of a property. Setting member variables will appear to work until a mutator calls CreateVariations after the member variable is set. The first variant will have the member variables, but any other variants will have zero values for all member variables. To catch this common case early, replace all modules with clones after running all the mutators but before GenerateBuildActions. This catches the anti-pattern used in bootstrap, replace the buildStage member variable with a property. Change-Id: I6ff37580783a6227ebba2b46d577b443566a79bb
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.