| # 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/components.gni") |
| import("//build/config.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| launcher_sources = [ "src/main.rs" ] |
| |
| launcher_deps = [ |
| "//src/diagnostics/detect:lib", |
| "//src/diagnostics/lib/util/v2-argh-wrapper", |
| "//src/diagnostics/persistence:lib", |
| "//src/diagnostics/sampler:lib", |
| "//src/lib/diagnostics/log/rust", |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| ] |
| |
| rustc_binary("bin") { |
| name = "launcher" |
| edition = "2021" |
| |
| deps = launcher_deps |
| |
| sources = launcher_sources |
| } |
| |
| # The Detect integration test needs a "with fake time" version of Launcher. |
| |
| rustc_binary("bin_with_fake_time") { |
| testonly = true |
| name = "launcher_with_fake_time" |
| edition = "2021" |
| |
| deps = launcher_deps |
| |
| sources = launcher_sources |
| |
| non_rust_deps = [ "//src/lib/fake-clock/lib" ] |
| |
| visibility = [ "//src/diagnostics/detect/integration/target:*" ] |
| } |