| # Copyright 2023 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") |
| |
| rustc_library("lib") { |
| name = "ffx_tool_profiler" |
| edition = "2021" |
| with_unit_tests = true |
| |
| sources = [ |
| "src/args.rs", |
| "src/lib.rs", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.cpu.profiler:fuchsia.cpu.profiler_rust", |
| "//src/developer/ffx/config:lib", |
| "//src/developer/ffx/lib/errors:lib", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/developer/ffx/lib/symbol-index", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:async-fs", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:blocking", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tempfile", |
| ] |
| } |
| |
| ffx_tool("ffx_profiler") { |
| edition = "2021" |
| output_name = "ffx-profiler" |
| deps = [ |
| ":lib", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fuchsia-async", |
| ] |
| sources = [ "src/main.rs" ] |
| sdk_category = "internal" |
| data_deps = [ "//tools/symbolizer" ] |
| } |
| |
| group("profiler") { |
| public_deps = [ |
| ":ffx_profiler", |
| ":ffx_profiler_host_tool", |
| ] |
| } |
| |
| group("bin") { |
| public_deps = [ ":ffx_profiler_versioned" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":lib_test" ] |
| } |