| # Copyright 2020 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/sdk/sdk_host_tool.gni") |
| |
| if (is_host) { |
| rustc_binary("bin") { |
| name = "fvdl" |
| edition = "2021" |
| |
| with_unit_tests = true |
| test_environments = [ host_env ] |
| |
| deps = [ |
| "common:lib", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| ] |
| source_root = "src/main.rs" |
| sources = [ "src/main.rs" ] |
| } |
| |
| sdk_host_tool("fvdl_sdk") { |
| category = "partner" |
| output_name = "fvdl" |
| deps = [ ":bin" ] |
| } |
| |
| install_host_tools("host") { |
| deps = [ ":bin" ] |
| outputs = [ "fvdl" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":bin_test($host_toolchain)", |
| "common:tests($host_toolchain)", |
| ] |
| } |