| # 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. |
| |
| zx_library("fs") { |
| sdk = "source" |
| sdk_headers = [ |
| "fs/internal/connection.h", |
| "fs/internal/directory_connection.h", |
| "fs/internal/fidl_transaction.h", |
| "fs/internal/file_connection.h", |
| "fs/internal/node_connection.h", |
| "fs/lazy_dir.h", |
| "fs/locking.h", |
| "fs/managed_vfs.h", |
| "fs/mount_channel.h", |
| "fs/pseudo_dir.h", |
| "fs/pseudo_file.h", |
| "fs/queue.h", |
| "fs/ref_counted.h", |
| "fs/remote_dir.h", |
| "fs/remote.h", |
| "fs/service.h", |
| "fs/synchronous_vfs.h", |
| "fs/ticker.h", |
| "fs/trace.h", |
| "fs/tracked_remote_dir.h", |
| "fs/vfs_types.h", |
| "fs/vfs.h", |
| "fs/vmo_file.h", |
| "fs/vnode.h", |
| "fs/watcher.h", |
| ] |
| host = true |
| static = true |
| |
| public_deps = [ |
| "$zx/system/ulib/fbl:headers", |
| "$zx/system/ulib/fdio:headers", |
| "$zx/system/ulib/fit:headers", |
| ] |
| |
| deps = [ |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/fit", |
| "$zx/system/ulib/zircon-internal", |
| ] |
| |
| # Uncomment to enable FS_TRACE_DEBUG-level logging |
| # defines = [ "FS_TRACE_DEBUG_ENABLED" ] |
| |
| sources = [ |
| "vfs.cc", |
| "vnode.cc", |
| ] |
| |
| if (is_fuchsia) { |
| sources += [ |
| "connection.cc", |
| "directory_connection.cc", |
| "fidl_transaction.cc", |
| "file_connection.cc", |
| "lazy_dir.cc", |
| "managed_vfs.cc", |
| "mount.cc", |
| "mount_channel.cc", |
| "node_connection.cc", |
| "pseudo_dir.cc", |
| "pseudo_file.cc", |
| "remote_dir.cc", |
| "service.cc", |
| "synchronous_vfs.cc", |
| "tracked_remote_dir.cc", |
| "unmount.cc", |
| "vfs_types.cc", |
| "vmo_file.cc", |
| "watcher.cc", |
| ] |
| public_deps += [ |
| "$zx/system/ulib/async:headers", |
| "$zx/system/ulib/fit:headers", |
| "$zx/system/ulib/zx:headers", |
| |
| # <fs/vnode.h> has #include <fuchsia/io/llcpp/fidl.h>. |
| "$zx/system/fidl/fuchsia-io:llcpp.headers", |
| |
| # <fs/trace.h> has #include <trace/event.h>. |
| "$zx/system/ulib/trace:headers", |
| |
| # <fs/tracked_remote_dir.h> has #include <lib/async/cpp/wait.h>. |
| "$zx/system/ulib/async:async-cpp.headers", |
| ] |
| deps += [ |
| "$zx/system/fidl/fuchsia-cobalt:c", |
| "$zx/system/fidl/fuchsia-io:llcpp", |
| "$zx/system/fidl/fuchsia-mem:llcpp", |
| "$zx/system/ulib/async", |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/fdio", |
| "$zx/system/ulib/fidl", |
| "$zx/system/ulib/fit", |
| "$zx/system/ulib/fzl", |
| "$zx/system/ulib/sync", |
| "$zx/system/ulib/trace", |
| "$zx/system/ulib/zircon", |
| "$zx/system/ulib/zx", |
| ] |
| } |
| } |
| |
| if (is_fuchsia) { |
| # TODO(mcgrathr): This is for libdriver.so to include so it won't get |
| # libtrace-engine.so. Figure out a better way to handle this. |
| zx_library("fs-for-driver") { |
| visibility = [ |
| ":*", |
| "$zx/system/core/devmgr/*", |
| ] |
| sources = [ |
| "connection.cc", |
| "directory_connection.cc", |
| "fidl_transaction.cc", |
| "file_connection.cc", |
| "lazy_dir.cc", |
| "managed_vfs.cc", |
| "mount.cc", |
| "mount_channel.cc", |
| "node_connection.cc", |
| "pseudo_dir.cc", |
| "pseudo_file.cc", |
| "remote_dir.cc", |
| "service.cc", |
| "synchronous_vfs.cc", |
| "tracked_remote_dir.cc", |
| "unmount.cc", |
| "vfs.cc", |
| "vfs_types.cc", |
| "vmo_file.cc", |
| "vnode.cc", |
| "watcher.cc", |
| ] |
| |
| # Uncomment to enable FS_TRACE_DEBUG-level logging |
| # defines = [ "FS_TRACE_DEBUG_ENABLED" ] |
| |
| public_deps = [ |
| "$zx/system/ulib/async:headers", |
| "$zx/system/ulib/fbl:headers", |
| "$zx/system/ulib/fdio:headers", |
| "$zx/system/ulib/fit:headers", |
| "$zx/system/ulib/fzl:headers", |
| "$zx/system/ulib/zx:headers", |
| |
| # <fs/vnode.h> has #include <fuchsia/io/llcpp/fidl.h>. |
| "$zx/system/fidl/fuchsia-io:llcpp.headers", |
| |
| # <fs/trace.h> has #include <trace/event.h>. |
| "$zx/system/ulib/trace:trace-driver.headers", |
| |
| # <fs/tracked_remote_dir.h> has #include <lib/async/cpp/wait.h>. |
| "$zx/system/ulib/async:async-cpp.headers", |
| ] |
| deps = [ |
| "$zx/system/fidl/fuchsia-cobalt:c", |
| "$zx/system/fidl/fuchsia-io:llcpp", |
| "$zx/system/fidl/fuchsia-mem:llcpp", |
| "$zx/system/ulib/async", |
| "$zx/system/ulib/async:async-cpp", |
| "$zx/system/ulib/cobalt-client", |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/fdio", |
| "$zx/system/ulib/fidl", |
| "$zx/system/ulib/fit", |
| "$zx/system/ulib/fzl", |
| "$zx/system/ulib/sync", |
| "$zx/system/ulib/trace:trace-driver", |
| "$zx/system/ulib/zircon", |
| "$zx/system/ulib/zircon-internal", |
| "$zx/system/ulib/zx", |
| ] |
| } |
| } |
| |
| group("test") { |
| testonly = true |
| deps = [ |
| "journal:test", |
| "metrics/test:metrics", |
| "test:test", |
| "test_support:test", |
| "transaction:test", |
| ] |
| } |
| |
| group("posix") { |
| deps = [ "posix:posix_tests" ] |
| } |