blob: c8c611cd9d20a9768c0c2b29c38df199ac88c014 [file] [log] [blame]
# 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.
static_library("minfs") {
friend = [
"test:*",
"allocator/test:*",
"//src/storage/conformance/conformance_harness/minfs:bin",
]
visibility = [
"//src/devices/block/bin/disk-inspect",
"//src/storage/*",
]
public = [
"bcache.h",
"format.h",
"fsck.h",
"minfs.h",
"mount.h",
"transaction_limits.h",
]
sources = [
"allocator/allocator.h",
"allocator/allocator_common.cc",
"allocator/allocator_reservation.cc",
"allocator/allocator_reservation.h",
"allocator/inode_manager.h",
"allocator/metadata.cc",
"allocator/metadata.h",
"allocator/storage.h",
"allocator/storage_common.cc",
"block_utils.h",
"buffer_view.cc",
"buffer_view.h",
"directory.cc",
"directory.h",
"file.cc",
"file.h",
"fsck.cc",
"lazy_buffer.cc",
"lazy_buffer.h",
"lazy_reader.cc",
"lazy_reader.h",
"minfs.cc",
"minfs_private.h",
"pending_work.h",
"resizeable_array_buffer.cc",
"resizeable_array_buffer.h",
"resizeable_buffer.h",
"runner.cc",
"runner.h",
"superblock.h",
"transaction_limits.cc",
"unowned_vmo_buffer.h",
"vnode.cc",
"vnode.h",
"vnode_allocation.h",
"vnode_mapper.cc",
"vnode_mapper.h",
"writeback.cc",
"writeback.h",
]
public_deps = [
"//src/lib/storage/vfs/cpp/inspect",
"//src/lib/storage/vfs/cpp/transaction",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/storage/buffer",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
deps = [
"//sdk/lib/fit",
"//sdk/lib/syslog/cpp",
"//src/lib/storage/vfs/cpp",
"//src/storage/fvm",
"//src/storage/lib/disk_inspector",
"//zircon/system/ulib/bitmap",
"//zircon/system/ulib/range",
"//zircon/system/ulib/storage/operation",
"//zircon/third_party/ulib/cksum",
"//zircon/third_party/ulib/safemath",
]
if (is_fuchsia) {
public += [
"inspector/command_handler.h",
"inspector/minfs_inspector.h",
]
sources += [
"allocator/allocator.cc",
"allocator/inode_manager.cc",
"allocator/storage.cc",
"bcache.cc",
"component_runner.cc",
"component_runner.h",
"file_target.cc",
"inspector/command_handler.cc",
"inspector/disk_struct.cc",
"inspector/disk_struct.h",
"inspector/inspector.cc",
"inspector/inspector.h",
"inspector/inspector_inode.cc",
"inspector/inspector_inode.h",
"inspector/inspector_inode_table.cc",
"inspector/inspector_inode_table.h",
"inspector/inspector_private.h",
"inspector/inspector_superblock.cc",
"inspector/inspector_superblock.h",
"inspector/loader.cc",
"inspector/loader.h",
"inspector/minfs_inspector.cc",
"inspector/parser.cc",
"inspector/parser.h",
"minfs_inspect_tree.cc",
"minfs_target.cc",
"mount.cc",
"service/admin.cc",
"service/admin.h",
"service/lifecycle.cc",
"service/lifecycle.h",
"service/startup.cc",
"service/startup.h",
"superblock.cc",
"vnode_allocation.cc",
]
public_deps += [
# fsck.h includes block-client/cpp/block-device.h
"//src/lib/storage/block_client/cpp",
# inspector/minfs_inspector.h includes journal/format.h
"//src/lib/storage/vfs/cpp/journal",
# Used by the MinfsInspectTree class
"//zircon/system/ulib/zx",
# runner.h includes lib/async-loop/cpp/loop.h
"//zircon/system/ulib/async-loop:async-loop-cpp",
# mount.h includes fidl/fuchsia.process.lifecycle/cpp/wire.h
"//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_cpp_wire",
]
deps += [
"//sdk/fidl/fuchsia.device:fuchsia.device_cpp_wire",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp_wire",
"//sdk/lib/fidl",
"//sdk/lib/inspect/service/cpp:cpp",
"//sdk/lib/sys/cpp:cpp",
"//sdk/lib/syslog/cpp",
"//src/storage/fidl/fuchsia.fs.startup:fuchsia.fs.startup_cpp_wire",
"//src/storage/fvm",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async:async-cpp",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fidl-utils",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/inspect",
"//zircon/system/ulib/storage-metrics",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/trace-provider",
]
} else {
public += [ "host.h" ]
sources += [
"allocator/allocator_host.cc",
"allocator/inode_manager_host.cc",
"allocator/storage_host.cc",
"bcache_host.cc",
"file_host.cc",
"host.cc",
"minfs_host.cc",
"superblock_host.cc",
]
deps += [
"//src/lib/storage/vfs/cpp/journal",
"//src/zircon/lib/zircon:zircon-headers",
]
}
}
group("tests") {
testonly = true
deps = [
"allocator/test:minfs-allocator-tests",
"test:minfs-fs-tests",
"test:minfs-fuzzers",
"test:minfs-slow-fs-tests",
"test/host:minfs_host($host_toolchain)",
]
}