Implement plugins for bootstrap go modules

Now that we have multi-stage bootstrapping, we can make the primary
builder build more dynamic. Add the concept of plugins that will be
linked and loaded into bootstrap_go_binary or bootstrap_go_package
modules. It's expected that the plugin's init() functions will do
whatever registration is necessary.

Example Blueprint definition:

    bootstrap_go_binary {
      name: "builder",
      ...
    }

    bootstrap_go_package {
      name: "plugin1",
      pluginFor: ["builder"],
    }

A package may specify more than one plugin if it will be inserted into
more than one go module.

Change-Id: I109835f444196b66fc4018c3fa36ba0875823184
7 files changed
tree: 080e0e3889836c07b7589ef8cd04c135062cc839
  1. bootstrap/
  2. bpfmt/
  3. bpmodify/
  4. choosestage/
  5. deptools/
  6. gotestmain/
  7. loadplugins/
  8. parser/
  9. pathtools/
  10. proptools/
  11. tests/
  12. .gitignore
  13. .travis.fix-fork.sh
  14. .travis.install-ninja.sh
  15. .travis.yml
  16. Blueprints
  17. bootstrap.bash
  18. build.ninja.in
  19. context.go
  20. context_test.go
  21. CONTRIBUTING.md
  22. doc.go
  23. LICENSE
  24. live_tracker.go
  25. mangle.go
  26. module_ctx.go
  27. ninja_defs.go
  28. ninja_strings.go
  29. ninja_strings_test.go
  30. ninja_writer.go
  31. ninja_writer_test.go
  32. package_ctx.go
  33. README.md
  34. scope.go
  35. singleton_ctx.go
  36. splice_modules_test.go
  37. unpack.go
  38. unpack_test.go
README.md

Blueprint Build System

Build Status

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.