| # 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 is shared between the client and agent code. |
| |
| import("//build/config/fuchsia/platform_version.gni") |
| import("//build/cpp/sdk_source_set.gni") |
| |
| sdk_source_set("ipc") { |
| category = "internal" |
| build_as_static = true |
| |
| sources = [ |
| "automation_instruction.cc", |
| "automation_instruction.h", |
| "decode_exception.cc", |
| "decode_exception.h", |
| "filter_utils.cc", |
| "filter_utils.h", |
| "message_reader.cc", |
| "message_reader.h", |
| "message_writer.cc", |
| "message_writer.h", |
| "protocol.cc", |
| "protocol.h", |
| "records.cc", |
| "records.h", |
| "unwinder_support.cc", |
| "unwinder_support.h", |
| ] |
| |
| public_configs = [ ":fuchsia_api_level" ] |
| |
| deps = [ |
| "//src/developer/debug/shared", |
| "//zircon/system/public", |
| ] |
| |
| public_deps = [ |
| "//src/developer/debug/unwinder", |
| "//src/lib/fxl", |
| ] |
| } |
| |
| config("fuchsia_api_level") { |
| defines = [ |
| # This is defined as __Fuchsia_API_level__ by clang if the target is Fuchsia. |
| # However, we also need this for host tools. |
| "FUCHSIA_API_LEVEL=${platform_version.in_development_api_level}", |
| ] |
| } |
| |
| # 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 = [ |
| "automation_instruction_unittests.cc", |
| "decode_exception_unittests.cc", |
| "filter_utils_unittests.cc", |
| "message_unittests.cc", |
| "protocol_unittests.cc", |
| ] |
| |
| deps = [ |
| "//src/developer/debug/shared", |
| "//src/developer/debug/shared:test_support", |
| "//third_party/googletest:gtest", |
| ] |
| |
| public_deps = [ ":ipc" ] |
| } |