blob: d257f1afb20b7f319edcf9e1c90207f51ca6f980 [file] [log] [blame]
# Copyright 2021 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.
# Please do not add more entries to this list. We plan to remove
# abseil-cpp from the Fuchsia platform source tree once cobalt
# moves out-of-tree.
declare_args() {
# F2FS debug message
f2fs_bu_debug = false
# Enforce every allocation in a ssr manner [for test]
f2fs_force_ssr = true
# Enable f2fs_roll_forward
f2fs_roll_fwd = false
}
static_library("f2fs") {
sources = [
"bcache.cc",
"checkpoint.cc",
"data.cc",
"dir.cc",
"dir_hash.cc",
"f2fs.cc",
"file.cc",
"gc.cc",
"mkfs.cc",
"namei.cc",
"node.cc",
"recovery.cc",
"segment.cc",
"super.cc",
"third_party/ext2_hash/hash.cc",
"third_party/ext2_hash/hash.h",
"vnode.cc",
]
public = [
"bcache.h",
"dir.h",
"f2fs.h",
"f2fs_internal.h",
"f2fs_layout.h",
"f2fs_lib.h",
"f2fs_types.h",
"file.h",
"mkfs.h",
"node.h",
"node.h",
"segment.h",
"vnode.h",
]
public_deps = [
"//zircon/public/lib/fbl",
# bcache.h includes fs/transaction/device_transaction_handler.h & storage/buffer/...
"//src/lib/storage/vfs/cpp/transaction",
"//zircon/system/ulib/storage/buffer",
# bcache.h includes fuchsia/hardware/block/c/fidl.h.
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
# fsck.h includes block-client/cpp/block-device.h
"//src/lib/storage/vfs/cpp",
"//zircon/public/lib/zircon-internal",
"//zircon/system/ulib/block-client",
]
deps = [
"//sdk/fidl/fuchsia.io",
"//sdk/fidl/fuchsia.io:fuchsia.io_llcpp",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp",
"//src/lib/storage/vfs/cpp/metrics:metrics-cobalt",
"//zircon/public/lib/async",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/fidl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fidl-utils",
"//zircon/system/ulib/storage-metrics",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/trace-provider:trace-provider-with-fdio",
]
if (f2fs_bu_debug) {
defines = [ "F2FS_BU_DEBUG" ]
}
if (f2fs_force_ssr) {
defines = [ "F2FS_FORCE_SSR" ]
}
if (f2fs_roll_fwd) {
defines = [ "F2FS_ROLL_FORWARD" ]
}
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}