blob: 871c99ff088a0d89b6b28623b7cf4fe01909824f [file] [log] [blame]
# Copyright (C) 2018 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/perfetto.gni")
import("//build_overrides/build.gni")
source_set("wire_protocol") {
public_configs = [ "../../../buildtools:libunwindstack_config" ]
deps = [
"../../../buildtools:libunwindstack",
"../../../gn:default_deps",
"../../base",
"../../base:unix_socket",
]
sources = [
"wire_protocol.cc",
"wire_protocol.h",
]
}
source_set("daemon") {
public_configs = [ "../../../buildtools:libunwindstack_config" ]
deps = [
":wire_protocol",
"../../../buildtools:libunwindstack",
"../../../gn:default_deps",
"../../base",
"../../base:unix_socket",
]
sources = [
"bookkeeping.cc",
"bookkeeping.h",
"queue_messages.h",
"record_reader.cc",
"record_reader.h",
"socket_listener.cc",
"socket_listener.h",
"string_interner.cc",
"string_interner.h",
"unwinding.cc",
"unwinding.h",
]
}
source_set("client") {
public_configs = [ "../../../buildtools:libunwindstack_config" ]
deps = [
":wire_protocol",
"../../../buildtools:libunwindstack",
"../../../gn:default_deps",
"../../base",
"../../base:unix_socket",
]
sources = [
"client.cc",
"client.h",
"sampler.cc",
"sampler.h",
]
}
source_set("unittests") {
public_configs = [ "../../../buildtools:libunwindstack_config" ]
testonly = true
deps = [
":client",
":daemon",
":wire_protocol",
"../../../gn:default_deps",
"../../../gn:gtest_deps",
"../../base",
"../../base:test_support",
]
sources = [
"bookkeeping_unittest.cc",
"bounded_queue_unittest.cc",
"client_unittest.cc",
"heapprofd_integrationtest.cc",
"record_reader_unittest.cc",
"sampler_unittest.cc",
"socket_listener_unittest.cc",
"string_interner_unittest.cc",
"unwinding_unittest.cc",
"wire_protocol_unittest.cc",
]
}
# This will export publicly visibile symbols for the malloc_hooks.
source_set("malloc_hooks") {
deps = [
":client",
":wire_protocol",
"../../../gn:default_deps",
"../../base",
"../../base:unix_socket",
]
cflags = [
"-isystem",
rebase_path("../../../buildtools/bionic/libc", root_build_dir),
]
sources = [
"malloc_hooks.cc",
]
}