blob: 455f39d5fdb1182787fc3aaf8dc76b85d243429e [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("//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:byteorder",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:thiserror",
]
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",
]
}
# TODO(fxbug.dev/78438): re-enable when tests build
# group("tests") {
# testonly = true
# deps = [ ":lib_test($host_toolchain)" ]
# }