| # 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/rust/rustc_library.gni") | |
| import("//src/developer/ffx/build/ffx_tool.gni") | |
| assert(is_host, "ffx coverage subtool is intended for host toolchain use only") | |
| rustc_library("ffx_coverage_args") { | |
| version = "0.1.0" | |
| edition = "2024" | |
| sources = [ "src/args.rs" ] | |
| source_root = "src/args.rs" | |
| deps = [ "//third_party/rust_crates:argh" ] | |
| } | |
| rustc_library("ffx_coverage") { | |
| version = "0.1.0" | |
| edition = "2024" | |
| with_unit_tests = true | |
| sources = [ "src/lib.rs" ] | |
| deps = [ | |
| ":ffx_coverage_args", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/developer/ffx/lib/symbol-index", | |
| "//src/developer/ffx/lib/writer:lib", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:async-trait", | |
| "//third_party/rust_crates:glob", | |
| "//third_party/rust_crates:rayon", | |
| "//third_party/rust_crates:tempfile", | |
| ] | |
| test_deps = [ | |
| "//src/developer/ffx/config:lib", | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates:assert_matches", | |
| ] | |
| } | |
| ffx_tool("ffx_coverage_tool") { | |
| edition = "2024" | |
| output_name = "ffx-coverage" | |
| deps = [ | |
| ":ffx_coverage", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/lib/fuchsia-async", | |
| ] | |
| sources = [ "src/main.rs" ] | |
| sdk_target_name = "sdk" | |
| sdk_category = "partner" | |
| } | |
| group("coverage") { | |
| public_deps = [ | |
| ":ffx_coverage_tool", | |
| ":ffx_coverage_tool_host_tool", | |
| ] | |
| } | |
| group("bin") { | |
| public_deps = [ ":ffx_coverage_tool_versioned" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":ffx_coverage_test($host_toolchain)" ] | |
| } |