| # Copyright 2019 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| if (host_toolchain == current_toolchain) { |
| rustc_binary("minfs-fsck-host") { |
| testonly = true |
| edition = "2018" |
| deps = [ |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:structopt", |
| "//tools/blackout/blackout-host", |
| ] |
| source_root = "src/host.rs" |
| |
| sources = [ "src/host.rs" ] |
| } |
| } |
| |
| rustc_binary("minfs-fsck-target-bin") { |
| testonly = true |
| edition = "2018" |
| deps = [ |
| "//src/lib/storage/fs_management", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:structopt", |
| "//tools/blackout/blackout-target", |
| ] |
| source_root = "src/target.rs" |
| |
| sources = [ "src/target.rs" ] |
| } |
| |
| package("minfs-fsck-target") { |
| testonly = true |
| deps = [ |
| ":minfs-fsck-target-bin", |
| "//src/storage/bin/minfs", |
| ] |
| binaries = [ |
| { |
| name = "minfs" |
| }, |
| { |
| name = "minfs_fsck_target_bin" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/minfs_fsck_target.cmx") |
| dest = "minfs_fsck_target.cmx" |
| }, |
| ] |
| } |
| |
| group("minfs-fsck") { |
| testonly = true |
| public_deps = [ |
| ":minfs-fsck-host($host_toolchain)", |
| ":minfs-fsck-target", |
| ] |
| } |