| # 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. |
| |
| executable("devhost") { |
| sources = [ |
| "main.cpp", |
| ] |
| deps = [ |
| ":driver", |
| ] |
| } |
| |
| source_set("common") { |
| visibility = [ ":*" ] |
| |
| sources = [ |
| "api.cpp", |
| "composite-device.cpp", |
| "connection-destroyer.cpp", |
| "core.cpp", |
| "devhost.cpp", |
| "device-controller-connection.cpp", |
| "proxy-iostate.cpp", |
| "rpc-server.cpp", |
| "scheduler_profile.cpp", |
| "tracing.cpp", |
| "zx-device.cpp", |
| ] |
| |
| public_deps = [ |
| "$zx/system/banjo/ddk.protocol.composite", |
| "$zx/system/fidl/fuchsia-device:c", |
| "$zx/system/fidl/fuchsia-device-manager:c", |
| "$zx/system/fidl/fuchsia-io:c", |
| "$zx/system/fidl/fuchsia-scheduler:c", |
| "$zx/system/ulib/async:async-cpp.static", |
| "$zx/system/ulib/async:async-default.static", |
| "$zx/system/ulib/async:static", |
| "$zx/system/ulib/async-loop:async-loop-cpp.static", |
| "$zx/system/ulib/ddk", |
| "$zx/system/ulib/fbl", |
| "$zx/system/ulib/fdio", |
| "$zx/system/ulib/fidl", |
| "$zx/system/ulib/fit", |
| "$zx/system/ulib/fs:fs-for-driver", |
| "$zx/system/ulib/sync", |
| "$zx/system/ulib/trace:trace-driver", |
| "$zx/system/ulib/trace-provider:static", |
| "$zx/system/ulib/zircon", |
| "$zx/system/ulib/zircon-internal", |
| "$zx/system/ulib/zx", |
| "$zx/system/ulib/zxio", |
| "../shared:env", |
| ] |
| configs += [ "$zx/public/gn/config:static-libc++" ] |
| } |
| |
| # "$zx/system/ulib/driver" is an alias for this. |
| library("driver") { |
| sdk = "shared" |
| sdk_headers = [] |
| shared = true |
| static = false |
| configs += [ "$zx/public/gn/config:visibility_hidden" ] |
| |
| sources = [] |
| |
| deps = [ |
| ":common", |
| ] |
| |
| # Since the tracing support is brought in via an archive, we need explicit |
| # references to ensure everything is present. |
| libs = [ "$zx/system/ulib/trace-engine/ddk-exports.ld" ] |
| |
| assert_no_deps = [ "$zx/system/ulib/trace-engine:trace-engine.shared" ] |
| } |
| |
| test("devhost-test") { |
| test_group = "ddk" |
| sources = [ |
| "device-controller-connection-test.cpp", |
| "proxy-iostate-test.cpp", |
| ] |
| deps = [ |
| ":common", |
| "$zx/system/ulib/zxtest", |
| "../shared:env", |
| ] |
| } |