blob: d8ee2b47f369842ac4283312414ab7f88e749c38 [file] [log] [blame]
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("../../gn/fuzzer.gni")
import("../../gn/perfetto.gni")
import("../../gn/proto_library.gni")
import("../../gn/test.gni")
# This build file should not be leaked into all embedders. Only select
# projects should be depending on our IPC layer.
assert(enable_perfetto_ipc)
source_set("client") {
public_deps = [
"../../include/perfetto/ext/ipc",
"../base:unix_socket",
]
deps = [
":common",
"../../gn:default_deps",
"../../protos/perfetto/ipc:wire_protocol_cpp",
"../base",
]
sources = [
"client_impl.cc",
"client_impl.h",
"service_proxy.cc",
]
}
source_set("host") {
public_deps = [
"../../include/perfetto/ext/ipc",
"../base:unix_socket",
]
deps = [
":common",
"../../gn:default_deps",
"../../protos/perfetto/ipc:wire_protocol_cpp",
"../base",
]
sources = [
"host_impl.cc",
"host_impl.h",
]
}
source_set("common") {
public_deps = [
"../../include/perfetto/ext/ipc",
"../../protos/perfetto/ipc:wire_protocol_cpp",
]
deps = [
"../../gn:default_deps",
"../base",
]
sources = [
"buffered_frame_deserializer.cc",
"buffered_frame_deserializer.h",
"deferred.cc",
"virtual_destructors.cc",
]
}
perfetto_fuzzer_test("buffered_frame_deserializer_fuzzer") {
sources = [ "buffered_frame_deserializer_fuzzer.cc" ]
deps = [
":common",
"../../gn:default_deps",
"../../protos/perfetto/ipc:wire_protocol_cpp",
"../base",
]
}
perfetto_unittest_source_set("unittests") {
testonly = true
deps = [
":client",
":common",
":host",
":test_messages_cpp",
":test_messages_ipc",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../protos/perfetto/ipc:wire_protocol_cpp",
"../base",
"../base:test_support",
]
sources = [
"buffered_frame_deserializer_unittest.cc",
"client_impl_unittest.cc",
"deferred_unittest.cc",
"host_impl_unittest.cc",
"test/ipc_integrationtest.cc",
]
}
perfetto_proto_library("test_messages_@TYPE@") {
proto_generators = [
"ipc",
"zero",
"cpp",
]
sources = [
"test/client_unittest_messages.proto",
"test/deferred_unittest_messages.proto",
"test/greeter_service.proto",
]
}
# This is used by Bazel BUILD rules.
static_library("perfetto_ipc") {
complete_static_lib = true
deps = [
":client",
":host",
"../../gn:default_deps",
]
}