| # 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. |
| |
| library("blobfs") { |
| host = true |
| sources = [ |
| "common.cpp", |
| "compression/lz4.cpp", |
| "compression/zstd.cpp", |
| "extent-reserver.cpp", |
| "fsck.cpp", |
| "iterator/allocated-extent-iterator.cpp", |
| "iterator/block-iterator.cpp", |
| "iterator/vector-extent-iterator.cpp", |
| "node-reserver.cpp", |
| ] |
| public_deps = [ |
| "$zx/system/ulib/bitmap:headers", |
| "$zx/system/ulib/fs:headers", |
| "$zx/system/ulib/id_allocator:headers", |
| |
| # <blobfs/format.h> has #include <digest/digest.h>. |
| "$zx/system/ulib/digest:headers", |
| |
| # <blobfs/allocator.h> has #include <fuchsia/blobfs/c/fidl.h>. |
| "$zx/system/fidl/fuchsia-blobfs:c.headers", |
| |
| # <blobfs/compression/compressor.h> has #include <lz4/lz4frame.h> |
| "$zx/third_party/ulib/lz4:headers", |
| |
| # <blobfs/compression/compressor.h> has #include <zstd/zstd.h> |
| "$zx/third_party/ulib/zstd:headers", |
| ] |
| deps = [ |
| "$zx/system/ulib/bitmap", |
| "$zx/system/ulib/digest", |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/fdio:headers", |
| "$zx/system/ulib/fvm", |
| "$zx/system/ulib/id_allocator", |
| "$zx/system/ulib/zircon-internal", |
| "$zx/third_party/ulib/cksum", |
| "$zx/third_party/ulib/lz4", |
| "$zx/third_party/ulib/safemath", |
| "$zx/third_party/ulib/uboringssl", |
| "$zx/third_party/ulib/zstd", |
| ] |
| if (is_fuchsia) { |
| sources += [ |
| "allocator.cpp", |
| "blob-cache.cpp", |
| "blob.cpp", |
| "blobfs.cpp", |
| "buffer.cpp", |
| "cache-node.cpp", |
| "compression/blob-compressor.cpp", |
| "directory.cpp", |
| "iterator/node-populator.cpp", |
| "journal-entry.cpp", |
| "journal.cpp", |
| "metrics.cpp", |
| "operation.cpp", |
| "ring-buffer.cpp", |
| "unbuffered-operations-builder.cpp", |
| "vmo-buffer.cpp", |
| "write-txn.cpp", |
| "writeback-queue.cpp", |
| "writeback-work.cpp", |
| "writeback.cpp", |
| ] |
| public_deps += [ |
| "$zx/system/ulib/block-client:headers", |
| |
| # <blobfs/writeback.h> has #include <lib/sync/completion.h>. |
| "$zx/system/ulib/sync:headers", |
| ] |
| deps += [ |
| "$zx/system/fidl/fuchsia-blobfs:c", |
| "$zx/system/fidl/fuchsia-device:c", |
| "$zx/system/fidl/fuchsia-hardware-block:c", |
| "$zx/system/fidl/fuchsia-hardware-block-volume:c", |
| "$zx/system/ulib/async", |
| "$zx/system/ulib/async:async-cpp", |
| "$zx/system/ulib/async:async-default", |
| "$zx/system/ulib/async-loop", |
| "$zx/system/ulib/async-loop:async-loop-cpp", |
| "$zx/system/ulib/block-client", |
| "$zx/system/ulib/fdio", |
| "$zx/system/ulib/fidl-utils", |
| "$zx/system/ulib/fzl", |
| "$zx/system/ulib/sync", |
| "$zx/system/ulib/trace", |
| "$zx/system/ulib/trace-engine", |
| "$zx/system/ulib/zircon", |
| "$zx/system/ulib/zx", |
| ] |
| } else { |
| sources += [ "host.cpp" ] |
| deps += [ "$zx/system/ulib/fs-host" ] |
| } |
| } |