| # 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. |
| |
| driver("zxcrypt") { |
| sources = [ |
| "device-info.cc", |
| "device-manager.cc", |
| "device.cc", |
| "extra.cc", |
| "worker.cc", |
| ] |
| configs += [ "$zx/public/gn/config:integer-paranoia" ] |
| |
| # Until library loading is fully async, dynamically linking libraries can |
| # deadlock block device drviers. All dependencies for zxcrypt should be |
| # static or already linked by the devhost. We consider libc, libzircon, and |
| # libdriver safe to depend on dynamically here. |
| deps = [ |
| "$zx/system/banjo/ddk.protocol.block", |
| "$zx/system/banjo/ddk.protocol.block.partition", |
| "$zx/system/banjo/ddk.protocol.block.volume", |
| "$zx/system/fidl/fuchsia-hardware-zxcrypt:c", |
| "$zx/system/ulib/bitmap", |
| "$zx/system/ulib/crypto:zircon-crypto.static", |
| "$zx/system/ulib/ddk", |
| "$zx/system/ulib/ddktl", |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/pretty", |
| "$zx/system/ulib/zircon", |
| "$zx/system/ulib/zx", |
| "$zx/system/ulib/zxcrypt:zxcrypt-dev.static", |
| ] |
| |
| # Make sure we don't accidentally pull in a couple of easily-added dynamic |
| # library dependencies. |
| assert_no_deps = [ |
| "$zx/system/ulib/trace-engine", |
| "$zx/system/ulib/crypto:zircon-crypto", |
| |
| # Some day, we'd also like to be able to assert we don't pull in fdio here, |
| # but it is pulled in transitively by //$zx/system/ulib/driver, which is |
| # needed by //$zx/system/ulib/zxcrypt-dev for the symbol |
| # |device_get_protocol|. |
| #"$zx/system/ulib/fdio", |
| "$zx/system/ulib/zxcrypt", |
| ] |
| } |