| # Copyright 2018 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. |
| |
| # This library contains helper classes used by both the debug_agent and zxdb |
| # but that aren't directly related to the protocol. |
| static_library("shared") { |
| sources = [ |
| "arch_arm64.h", |
| "arch_x86.h", |
| "buffered_fd.cc", |
| "buffered_fd.h", |
| "component_utils.cc", |
| "component_utils.h", |
| "message_loop.cc", |
| "message_loop.h", |
| "regex.cc", |
| "regex.h", |
| "stream_buffer.cc", |
| "stream_buffer.h", |
| "test_stream_buffer.cc", |
| "test_stream_buffer.h", |
| "worker_pool.cc", |
| "worker_pool.h", |
| "zx_status.cc", |
| "zx_status.h", |
| "zx_status_definitions.h", |
| ] |
| |
| public_deps = [ |
| "//src/developer/debug/shared/logging", |
| "//src/lib/containers/cpp", |
| "//src/lib/fxl", |
| ] |
| |
| if (current_toolchain == host_toolchain) { |
| # Host toolchain. |
| sources += [ |
| "message_loop_poll.cc", |
| "message_loop_poll.h", |
| ] |
| } else { |
| # Target toolchain. |
| sources += [ |
| "buffered_zx_socket.cc", |
| "buffered_zx_socket.h", |
| "event_handlers.cc", |
| "event_handlers.h", |
| "message_loop_target.cc", |
| "message_loop_target.h", |
| "zircon_utils.cc", |
| "zircon_utils.h", |
| ] |
| |
| public_deps += [ |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| } |
| |
| # Unit tests for this directory. These are intended to be referenced by unit |
| # test targets for the consumers of this library. |
| source_set("tests") { |
| testonly = true |
| sources = [ |
| "component_utils_unittest.cc", |
| "message_loop_unittest.cc", |
| "regex_unittest.cc", |
| "stream_buffer_unittest.cc", |
| "worker_pool_unittest.cc", |
| ] |
| |
| deps = [ |
| ":shared", |
| "//third_party/googletest:gtest", |
| ] |
| } |