blob: ad6d78e41022a5f607aeb0740d8becb97fbe3be0 [file] [log] [blame]
# Copyright 2019 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/host.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/sdk/sdk_host_tool.gni")
import("//build/testing/environments.gni")
if (is_host) {
rustc_binary("bin") {
name = "bindc"
edition = "2018"
with_unit_tests = true
test_environments = [ host_env ]
deps = [
"//src/devices/lib/bind:lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:structopt",
]
sources = [ "src/main.rs" ]
inputs = [
"src/templates/bind_v1.h.template",
"src/templates/bind_v2.h.template",
"src/templates/composite_bind.h.template",
"src/templates/fragment.template",
"src/templates/fidl.template",
"src/tests/expected_composite_code",
"src/tests/expected_composite_code_w_dashes",
]
}
install_host_tools("host") {
deps = [ ":bin" ]
outputs = [ "bindc" ]
}
sdk_host_tool("bindc_sdk") {
category = "partner"
output_name = "bindc"
deps = [ ":bin" ]
}
}
group("tests") {
testonly = true
deps = [
":bin_test($host_toolchain)",
"./examples:tests",
]
}