| # 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 = [ |
| "address_range.cc", |
| "address_range.h", |
| "arch_arm64.h", |
| "arch_x86.cc", |
| "arch_x86.h", |
| "buffered_fd.cc", |
| "buffered_fd.h", |
| "component_utils.cc", |
| "component_utils.h", |
| "curl.cc", |
| "curl.h", |
| "handle_info.cc", |
| "handle_info.h", |
| "largest_less_or_equal.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 = [ |
| "//sdk/lib/fit-promise", |
| "//src/developer/debug/shared/logging", |
| "//src/lib/containers/cpp", |
| "//src/lib/fxl", |
| "//third_party/curl:libcurl", |
| ] |
| |
| if (is_host) { |
| # 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_exception_watcher.h", |
| "zircon_utils.cc", |
| "zircon_utils.h", |
| ] |
| |
| public_deps += [ |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "mock_memory.cc", |
| "mock_memory.h", |
| "test_with_loop.h", |
| ] |
| |
| public_deps = [ |
| ":shared", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| # 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 = [ |
| "address_range_unittest.cc", |
| "component_utils_unittest.cc", |
| "handle_info_unittest.cc", |
| "largest_less_or_equal_unittest.cc", |
| "message_loop_unittest.cc", |
| "regex_unittest.cc", |
| "stream_buffer_unittest.cc", |
| "worker_pool_unittest.cc", |
| ] |
| |
| deps = [ |
| ":shared", |
| "//third_party/googletest:gtest", |
| ] |
| } |