blob: 3e48bb0ff8364f8a47023cce2ec88d1e2ddfdebf [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("ipc") {
public_configs = [ "../../gn:default_config" ]
public_deps = [
"../../include/perfetto/ext/ipc",
"../base:unix_socket",
]
deps = [
"../../gn:default_deps",
"../../protos/perfetto/ipc:wire_protocol_cpp",
"../base",
]
sources = [
"buffered_frame_deserializer.cc",
"buffered_frame_deserializer.h",
"client_impl.cc",
"client_impl.h",
"deferred.cc",
"host_impl.cc",
"host_impl.h",
"service_proxy.cc",
"virtual_destructors.cc",
]
}
perfetto_fuzzer_test("buffered_frame_deserializer_fuzzer") {
sources = [
"buffered_frame_deserializer_fuzzer.cc",
]
deps = [
":ipc",
"../../gn:default_deps",
"../../protos/perfetto/ipc:wire_protocol_cpp",
]
}
perfetto_unittest_source_set("unittests") {
testonly = true
deps = [
":ipc",
":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 = [
":ipc",
"../../gn:default_deps",
]
}