tree: 004fb6d0e4ea0787f1e633de86b38a3fc617f4f7 [path history] [tgz]
  9. zircon_header_library.gni
  10. zircon_host_tool.gni
  11. zircon_library.gni

GN support for Zircon

TODO(BLD-353): This will go away when the build is fully unified.

Code in //build/config/fuchsia/zircon.gni populates the //zircon/public directory tree with links to This code generates targets for its directory based on instructions written as JSON by the Zircon gn gen step. That code uses the .gni files here.


The main build file // imports //build/config/fuchsia/zircon.gni. That makes that GN code run before all other evaluation in gn gen. This ensures that non-Zircon build files can safely depend on the generated targets.

This early GN code has the side effect of populating the //zircon/public subdirectories with files that are links to This happens on every gn gen run, but all it does is maintain those directories of links. So multiple separate Fuchsia builds can refer to multiple separate Zircon builds without mutual interference, as long as they are referring to the same Zircon source tree so there's the same set of //zircon/public subdirectories to populate.

Each file uses its portion of the instructions written as JSON by the Zircon gn gen step to define all the appropriate targets for that directory. Hence, the actual operation of each //zircon/public/.../ file is controlled by the particular Zircon build attached to the Fuchsia build, but the files themselves are fixed.