commit | f14e096607554424716a26b5efcc5806e439c371 | [log] [tgz] |
---|---|---|
author | Dan Willemsen <dwillemsen@google.com> | Mon Feb 06 14:00:10 2017 -0800 |
committer | Dan Willemsen <dwillemsen@google.com> | Sat Feb 18 15:12:13 2017 -0800 |
tree | 114e315f73229dc38e3344966cd15af8bffc75af | |
parent | e8a09f95f675707c3829d686da0ff8765405227c [diff] |
Support darwin/linux specific go sources In order to use certain syscalls, some source must only be compiled on one of darwin or linux. There are also cases where it's simplest to have two implementations of a method (or struct) instead of choosing an implementation at runtime. The standard go tools use _<GOOS>.go for this, but the explicit structs map better into the current blueprint format (and you can still use _darwin.go / _linux.go to maintain compatiblity with those tools). Test: Define _linux.go / _darwin.go files, ensure only one is compiled. Change-Id: I58bffefbf839ba52dea3d8e7d3ec67eaa721c463
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.