tree: 105a4f99cf9d10a5aa66fd29cd825c4ef0b411ef [path history] [tgz]
  3. boards.mako
  5. fidl.mako
  6. header.mako
  7. host_tool.mako
  10. main.mako
  11. shared_library.mako
  12. source_library.mako
  13. static_library.mako
  14. 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.