| # 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/test/test_package.gni") |
| |
| if (host_toolchain == current_toolchain) { |
| rustc_binary("fidldoc_bin") { |
| name = "fidldoc" |
| edition = "2018" |
| deps = [ |
| "//third_party/rust_crates:clap", |
| "//third_party/rust_crates:failure", |
| "//third_party/rust_crates:handlebars", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:rayon", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_derive", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:structopt", |
| "//third_party/rust_crates:tempfile", |
| ] |
| with_unit_tests = true |
| } |
| } |
| |
| copy("fidldoc_copy_config") { |
| sources = [ |
| "src/fidldoc.config.json", |
| ] |
| outputs = [ |
| "${root_out_dir}/host_${current_cpu}/fidldoc.config.json", |
| ] |
| } |
| |
| group("fidldoc") { |
| deps = [ |
| ":fidldoc_bin($host_toolchain)", |
| ":fidldoc_copy_config", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ |
| ":fidldoc_bin_test($host_toolchain)", |
| ] |
| } |