| # Copyright 2020 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/components.gni") |
| import("//build/host.gni") |
| |
| executable("shell_mirror") { |
| output_name = "shell_mirror" |
| |
| sources = [ "main.cc" ] |
| deps = [ |
| ":server_lib", |
| "//src/developer/debug/ipc:client", |
| "//src/developer/debug/zxdb/client", |
| "//src/developer/debug/zxdb/common", |
| "//zircon/system/ulib/cmdline", |
| ] |
| } |
| |
| static_library("server_lib") { |
| public = [ |
| "command_line_options.h", |
| "server.h", |
| ] |
| |
| sources = [ |
| "command_line_options.cc", |
| "server.cc", |
| ] |
| |
| deps = [ |
| ":shared", |
| "//src/developer/debug/shared", |
| "//src/lib/fxl", |
| "//third_party/boringssl", |
| "//zircon/system/ulib/cmdline", |
| ] |
| } |
| |
| source_set("shared") { |
| public = [ |
| "common.h", |
| "wire_format.h", |
| ] |
| sources = [ "wire_format.cc" ] |
| deps = [ |
| "//sdk/lib/syslog/cpp", |
| "//src/developer/debug/shared", |
| ] |
| } |
| |
| source_set("client") { |
| public = [ "client.h" ] |
| sources = [ "client.cc" ] |
| deps = [ |
| ":shared", |
| "//src/developer/debug/shared", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| install_host_tools("shell_mirror_host") { |
| deps = [ ":shell_mirror" ] |
| outputs = [ "shell_mirror" ] |
| } |
| |
| executable("shell_mirror_tests_bin") { |
| testonly = true |
| sources = [ |
| "client_server_test.cc", |
| "test_shared.cc", |
| "test_shared.h", |
| "wire_format_test.cc", |
| ] |
| deps = [ |
| ":client", |
| ":server_lib", |
| ":shared", |
| "//sdk/lib/fdio", |
| "//src/developer/debug/ipc:client", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/storage/memfs", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/async-loop", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/cmdline", |
| ] |
| |
| # TODO(fxbug.dev/46840): Fix the leaks and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_component("shell-mirror-test") { |
| testonly = true |
| manifest = "meta/shell_mirror_tests_bin.cmx" |
| deps = [ ":shell_mirror_tests_bin" ] |
| } |
| |
| fuchsia_test_package("shell-mirror-tests") { |
| test_components = [ ":shell-mirror-test" ] |
| } |