blob: 12bd8a7d74b08a0bd10cbe3330f0e77563039df6 [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("//build_overrides/build.gni")
import("../../gn/fuzzer.gni")
import("../../gn/perfetto.gni")
import("../../gn/test.gni")
# Separate target because the embedder might not want this (e.g. on Windows).
if (is_linux || is_mac || is_android) {
source_set("platform_posix") {
deps = [
"../../gn:default_deps",
"../../include/perfetto/tracing",
"../base",
]
sources = [
"platform_posix.cc",
]
}
}
# Fake platform that allows buiding the client lib on all OSes. You can only use
# those parts of the client lib that do not use the platform.
source_set("platform_fake") {
deps = [
"../../gn:default_deps",
"../../include/perfetto/tracing",
]
sources = [
"platform_fake.cc",
]
}
# Code that both public headers and other non-public sources (e.g.
# src/tracing/core) need to depend on. It cannot be in the root :tracing target
# otherwise there would be a cyclic dependency because public itself needs to
# depend on tracing.
source_set("common") {
deps = [
"../../gn:default_deps",
"../../include/perfetto/tracing",
]
sources = [
"trace_writer_base.cc",
]
}
source_set("client_api") {
deps = [
"../../include/perfetto/tracing/core",
"../../protos/perfetto/config:cpp",
"../base",
"core",
]
public_deps = [
"../../gn:default_deps",
"../../include/perfetto/tracing",
]
sources = [
"data_source.cc",
"debug_annotation.cc",
"event_context.cc",
"internal/in_process_tracing_backend.cc",
"internal/in_process_tracing_backend.h",
"internal/tracing_muxer_impl.cc",
"internal/tracing_muxer_impl.h",
"internal/track_event_internal.cc",
"platform.cc",
"tracing.cc",
"track.cc",
"track_event_category_registry.cc",
"virtual_destructors.cc",
]
if (enable_perfetto_ipc) {
deps += [
"ipc/consumer",
"ipc/producer",
"ipc/service",
]
sources += [
"internal/system_tracing_backend.cc",
"internal/system_tracing_backend.h",
]
}
}