commit | d79f1af7423e0ef7a13573efdae5100a57fabc82 | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Wed Dec 09 18:03:13 2015 -0800 |
committer | Dan Willemsen <dwillemsen@google.com> | Thu Dec 10 16:18:15 2015 -0800 |
tree | 594f1ce143a57eb31aab0bc96ba83c77097b5a47 | |
parent | eb97a6e7a1afa6d4817545bec3304e906ecc35f7 [diff] |
Add build wrapper to do stage selection before ninja This wrapper script can be used instead of ninja to ensure the build won't get stuck building the primary builder. An example of when this would happen: 1. Do a successful build 2. Sync/make a change in the primary builder (soong, etc) that depends on a blueprint change. 3. The next build would notice that change, and rewind to the primary stage to rebuild the builder. That build would fail. 4. Sync/fix the blueprint code. 5. The next build would still fail. The bootstrap stage would need to be run in order to fix the primary stage, but we're still stuck in the primary stage. The only way to switch stages is to successfully complete everything required to choose the next stage. This generally isn't a problem in the main stage, since there is no code being built in the dependency chain leading up to stage selection. Any existing wrappers (like soong) can execute this wrapper (optionally skipping ninja execution) if they're worried about the above situation. This isn't strictly required -- running ninja directly will still work in most cases, you'll just need to re-run bootstrap.bash if you get into a bad state. Change-Id: I5901d7240a1daa388a786ceb1c8259502fc14058
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.