tree: 291b29f60621f9e102470f2d835a1f1d6a51d1ce [path history] [tgz]
  4. boards.mako
  6. fidl.mako
  7. header.mako
  8. host_tool.mako
  11. main.mako
  12. shared_library.mako
  13. source_library.mako
  14. static_library.mako
  15. sysroot.mako

GN support for Zircon

This folder contains utilities that help Zircon artifacts better integrate into the GN build without having to manually maintain GN build files in sync with the existing build files specific to Zircon. It also makes it so that targets in upper layers don‘t need to know about the structure of Zircon’s output directory in order to use Zircon build artifacts, as knowledge of that structure is confined within the generated GN build files.


The main build file //build/gn/ calls the //build/zircon/ script to produce files for Zircon.

That script uses a special, fast build of Zircon (make packages) to generate manifests for artifacts that are meant to be consumed by upper layers of the Fuchsia stack. These manifest are then turned into GN build files under //zircon/public whose targets other parts of the codebase can depend on.

This script is run early in the build process, before any other build file gets evaluated. This ensure that non-Zircon build files can safely depend on the generated targets.

In order to keep the generated build files up-to-date, that process is repeated every time a file changes under //zircon.

Note that the generated GN files should only depend on the Zircon source code. Invoking the Fuchsia build with different parameters on the same codebase should produce identical files.