blob: ffa9eb6a54332018fe94b9cff4d3e2f442e53882 [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("zxcrypt-dev") {
public = [
"ddk-volume.h",
"volume.h",
]
sources = [
"ddk-volume.cc",
"volume.cc",
]
public_deps = [
# volume.h references crypto/aead.h (among others).
"//src/security/fcrypto",
# ddk-volume.h has #include <ddk/device.h>.
"//src/lib/ddk",
]
configs += [ "//build/config/fuchsia:integer-paranoia" ]
# To minimize the set of libraries that we depend on that need to be loaded
# from /boot/lib in early boot, we statically link most of our dependencies.
deps = [
"//sdk/banjo/fuchsia.hardware.block:fuchsia.hardware.block_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_banjo_cpp",
"//src/lib/ddk",
"//third_party/boringssl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}
shared_library("zxcrypt-fdio") {
public = [
"fdio-volume.h",
"volume.h",
]
sources = [
"fdio-volume.cc",
"volume.cc",
]
public_deps = [
# volume.h includes crypto/aead.h (among others).
"//src/security/fcrypto",
]
configs += [ "//build/config/fuchsia:integer-paranoia" ]
deps = [
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
"//sdk/fidl/fuchsia.hardware.block.encrypted:fuchsia.hardware.block.encrypted_c",
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_c",
"//sdk/lib/fdio",
"//third_party/boringssl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
# 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" ]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
source_set("zxcrypt-client") {
public = [ "client.h" ]
sources = [ "client.cc" ]
public_deps = [
# client.h has #include <lib/fdio/cpp/caller.h>
"//zircon/system/ulib/fdio-caller",
]
deps = [
"//sdk/fidl/fuchsia.device:fuchsia.device_llcpp",
"//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c",
"//sdk/fidl/fuchsia.hardware.block.encrypted:fuchsia.hardware.block.encrypted_c",
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_c",
"//sdk/lib/fdio",
"//src/lib/storage/ramdevice_client/cpp:ramdevice-client-static",
"//src/security/kms-stateless",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
# 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" ]
# TODO(fxbug.dev/95833): This target uses the deprecated C bindings.
# Consider switching to the C++ bindings. See linked bug for details.
configs += [ "//build/c:fidl-deprecated-c-bindings" ]
}
group("tests") {
testonly = true
deps = [ "tests:zxcrypt-test" ]
}