| # 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", | |
| "//sdk/banjo/fuchsia.hardware.block.volume", | |
| "//src/lib/ddk", | |
| "//third_party/boringssl", | |
| "//zircon/public/lib/fbl", | |
| "//zircon/public/lib/sync", | |
| "//zircon/public/lib/zircon-internal", | |
| "//zircon/public/lib/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 = [ | |
| # fdio-volume.h has #include <lib/fdio/cpp/caller.h> | |
| "//zircon/system/ulib/fdio-caller", | |
| # volume.h includes crypto/aead.h (among others). | |
| "//src/security/fcrypto", | |
| ] | |
| configs += [ "//build/config/fuchsia:integer-paranoia" ] | |
| 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/security/kms-stateless", | |
| "//third_party/boringssl", | |
| "//zircon/public/lib/fbl", | |
| "//zircon/public/lib/sync", | |
| "//zircon/public/lib/zircon-internal", | |
| "//zircon/public/lib/zx", | |
| "//zircon/system/ulib/fdio-caller", | |
| "//zircon/system/ulib/fzl", | |
| "//zircon/system/ulib/ramdevice-client:ramdevice-client-static", | |
| ] | |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ "tests:zxcrypt-test" ] | |
| } |