Skip to content

Commit

Permalink
Add fidl_binding_deps support from the Fuchsia SDK json files (#813)
Browse files Browse the repository at this point in the history
The GN rules that parse the SDK json files previously only supported the
`fidl_deps` field for determining which fidl dependencies to depend on.
This change adds support for the newer `fidl_binding_deps` field, which
contains information about what flavor of bindings are needed (hlcpp vs
natural). Since our fidl GN targets always generate both hlcpp and
natural bindings, we don't need to check the binding_type in the json
file.
  • Loading branch information
mbrase authored Jan 11, 2024
1 parent a43582b commit a2dfdef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/fuchsia/sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,14 @@ template("_fuchsia_cc_source_library") {
_deps += [ "../fidl:$dep" ]
}

foreach(binding_dep, meta_json.fidl_binding_deps) {
# No need to check "binding_deps.binding_type" because we always
# generate both hlcpp and natural bindings.
foreach(dep, binding_dep.deps) {
_deps += [ "../fidl:$dep" ]
}
}

source_set(target_name) {
output_name = _output_name
public = _public_headers
Expand Down

0 comments on commit a2dfdef

Please sign in to comment.