| # 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/unification/zx_library.gni") |
| |
| # libmemfs-cpp.a: The C++ client library. |
| # |
| # Used to implement the C++ components of Memfs, which |
| # can be plugged into ulib/fs. |
| zx_library("memfs-cpp") { |
| sdk = "source" |
| sdk_headers = [ "lib/memfs/cpp/vnode.h" ] |
| sources = [ |
| "directory.cc", |
| "dnode.cc", |
| "file.cc", |
| "include/lib/memfs/memfs.h", |
| "memfs.cc", |
| "vmo.cc", |
| ] |
| public_deps = [ |
| # <lib/memfs/cpp/vnode.h> has #include <lib/fdio/io.h> |
| "//sdk/lib/fdio", |
| |
| # <lib/memfs/cpp/vnode.h> has #include <fbl/ref_ptr.h> |
| "//zircon/public/lib/fbl", |
| |
| # <lib/memfs/cpp/vnode.h> has #include <lib/zx/vmo.h> |
| "//zircon/public/lib/zx", |
| |
| # <lib/memfs/cpp/vnode.h> has #include "src/lib/storage/vfs/cpp/vfs.h> and many other <fs/*.h" |
| "//src/lib/storage/vfs/cpp", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/lib/syslog/cpp", |
| "//zircon/public/lib/async", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/sync", |
| ] |
| } |
| |
| # libmemfs.so: The C ABI client library. |
| # |
| # Used to create local temporary filesystems. |
| zx_library("memfs") { |
| sdk = "shared" |
| sdk_publishable = true |
| sdk_headers = [ "lib/memfs/memfs.h" ] |
| shared = true |
| sources = [ "memfs-local.cc" ] |
| public_deps = [ |
| # <lib/memfs/memfs.h> has #include <lib/async/dispatcher.h>. |
| "//sdk/lib/fit", |
| "//zircon/public/lib/async", |
| |
| # <lib/memfs/memfs.h> has #include <lib/sync/completion.h>. |
| "//zircon/public/lib/sync", |
| ] |
| deps = [ |
| ":memfs-cpp", |
| "//sdk/lib/fdio", |
| "//src/lib/storage/vfs/cpp", |
| "//zircon/public/lib/fbl", |
| ] |
| runtime_deps = [ |
| "//sdk/lib/fdio:fdio_sdk", |
| "//zircon/system/ulib/trace-engine:trace-engine_sdk", |
| ] |
| |
| # 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" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "test:tests" ] |
| } |