| # 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/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/testing/test_spec.gni") |
| |
| if (is_host) { |
| rustc_library("lib") { |
| name = "fastboot" |
| edition = "2021" |
| |
| # TODO(fxbug.dev/78438): this library contains unit tests, but they don't build |
| with_unit_tests = false |
| |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-fs", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| non_rust_deps = [ "//third_party/boringssl" ] |
| |
| sources = [ |
| "src/command.rs", |
| "src/lib.rs", |
| "src/reply.rs", |
| ] |
| } |
| } |
| |
| group("fastboot") { |
| deps = [ |
| ":lib($host_toolchain)", |
| |
| # This target copies the prebuilt fastboot into the build directory - as if |
| # it were a normally built tool - and defines metadata depended upon by the |
| # flashing workflow. When this fastboot implementation is ready, flashing |
| # logic should be replaced by the new tool - and this depedency may safely |
| # be removed. |
| "//build/images/tools:fastboot($host_toolchain)", |
| ] |
| } |
| # TODO(fxbug.dev/78438): re-enable when tests build |
| # group("tests") { |
| # testonly = true |
| # deps = [ ":lib_test($host_toolchain)" ] |
| # } |