blob: 85b330db042c2d44a4f5470959fecc8efe564f3b [file] [log] [blame]
# 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("//src/developer/ffx/build/ffx_tool.gni")
import("../../build/ffx_plugin.gni")
ffx_plugin("ffx_log") {
version = "0.1.0"
edition = "2021"
with_unit_tests = true
args_with_unit_tests = false
args_deps = [ "//src/diagnostics/lib/log-command" ]
config_data = [ "data/config.json" ]
deps = [
"//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust",
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust",
"//sdk/fidl/fuchsia.diagnostics.host:fuchsia.diagnostics.host_rust",
"//src/developer/ffx/config:lib",
"//src/developer/ffx/fidl:fuchsia.developer.ffx_rust",
"//src/developer/ffx/lib/fho:lib",
"//src/developer/ffx/lib/rcs:lib",
"//src/developer/ffx/lib/symbol-index",
"//src/diagnostics/lib/log-command",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:derivative",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:pin-project",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tokio",
"//third_party/rust_crates:tracing",
]
args_sources = [ "src/args.rs" ]
sources = [
"src/condition_variable.rs",
"src/error.rs",
"src/lib.rs",
"src/mutex.rs",
"src/symbolizer.rs",
"src/testing_utils.rs",
"src/transactional_symbolizer.rs",
]
test_deps = [
"//src/developer/ffx/lib/writer:lib",
"//src/diagnostics/lib/log-command",
"//src/lib/diagnostics/data/rust",
"//src/lib/diagnostics/selectors",
"//src/lib/fuchsia",
"//src/lib/fuchsia-sync",
"//src/sys/lib/moniker",
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:event-listener",
"//third_party/rust_crates:pin-project",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tokio",
]
}
ffx_tool("ffx_log_tool") {
# Needed for Honeydew's SDK inclusion
#
# TODO(b/330934833): Remove when IDK allows for `testonly` targets in dep
# tree or when we can separate the concept of data_dep from host_test_data.
testonly = false
edition = "2021"
output_name = "ffx-log"
deps = [
":ffx_log",
"//src/developer/ffx/lib/fho:lib",
"//src/lib/fuchsia-async",
]
sources = [ "src/main.rs" ]
sdk_target_name = "sdk"
sdk_category = "partner"
}
group("log") {
public_deps = [
":ffx_log_tool",
":ffx_log_tool_host_tool",
]
}
group("bin") {
public_deps = [ ":ffx_log_tool_versioned" ]
}
group("tests") {
testonly = true
deps = [ ":ffx_log_tests($host_toolchain)" ]
}