| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be found |
| # in the LICENSE file. |
| |
| import("//build/fidl/fidl.gni") |
| import("//zircon/tools/zither/zither_golden_files.gni") |
| |
| zbi_sources = [ |
| "board.fidl", |
| "cpu.fidl", |
| "driver-config.fidl", |
| "graphics.fidl", |
| "kernel.fidl", |
| "memory.fidl", |
| "overview.fidl", |
| "partition.fidl", |
| "reboot.fidl", |
| "zbi.fidl", |
| ] |
| |
| # TODO(https://fxbug.dev/42062786): This is not yet exported in the SDK - and rather is |
| # used to generate checked-in headers which are - but it will be eventually. |
| fidl("zbi") { |
| sources = zbi_sources |
| enable_zither = true |
| |
| # TODO(https://fxbug.dev/42061412): For string_array<N> and overlay. |
| experimental_flags = [ "zx_c_types" ] |
| |
| zither = { |
| c = { |
| # The C backend is used to generate checked-in headers within this |
| # include namespace. |
| output_namespace = "lib/zbi-format" |
| } |
| } |
| } |
| |
| zither_golden_files("zbi.c.checked-in") { |
| fidl = ":zbi" |
| backend = "c" |
| sources = [ "//sdk/lib/zbi-format/README.md" ] |
| foreach(source, zbi_sources - [ "overview.fidl" ]) { |
| name = get_path_info(source, "name") |
| sources += [ "//sdk/lib/zbi-format/include/lib/zbi-format/${name}.h" ] |
| } |
| } |