[build] Add library_headers() template.

This CL introduces a new template used to declare the public headers of
a given C++ library. As documented with the template, this provides
opportunity for higher parallelism, when targets only need to include
headers to get type definitions, and not link to the corresponding
library.

This also demonstrate how a few zx_library() instances are changed to
use the new template, i.e.:

- src/connectivity/openthread/lib/ot-radio/BUILD.gn:
  src/connectivity/openthread/lib/ot-stack/BUILD.gn:
  Turn a source-less zx_library() instance  directly into a
  library_headers() instance directly.

  This should be possible for any zx_library() instance that is not
  published to the SDK, and doesn't have any sources.

- simple-audio-stream: turn the zx_library() into a source_set() with
  a corresponding library_headers() target. This generakky

- src/lib/ddk: Move the public headers of a given zx_library() into
  its own library_headers() instance. The difference is that the headers
  will now participate in GN inclusion checks during 'gn gen', something
  that zx_library() cannot do without breaking kernel compilation (but
  this target is not compiled for the kernel).

  Also turns a few zx_library() source-less instances into a
  corresponding library_headers() instance.

Bug: None
Change-Id: I223b9b689623ac35de55b6768b803c2e71fc288f
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/474231
Fuchsia-Auto-Submit: David Turner <digit@google.com>
Commit-Queue: David Turner <digit@google.com>
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
7 files changed
tree: 3b53ea0dab06c8dd8c98b2ea942ab43f5af98e43
  1. boards/
  2. build/
  3. buildtools/
  4. bundles/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. README.md
  30. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.