• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../gn/test.gni")
16
17source_set("intern_map") {
18  deps = [
19    "../../gn:default_deps",
20    "../../include/perfetto/public",
21    "../base",
22  ]
23  sources = [
24    "intern_map.cc",
25    "intern_map.h",
26  ]
27}
28
29source_set("shared_lib") {
30  deps = [
31    ":intern_map",
32    "../../gn:default_deps",
33    "../../include/perfetto/protozero",
34    "../../include/perfetto/public",
35    "../base",
36    "../tracing:client_api",
37  ]
38  sources = [
39    "data_source.cc",
40    "heap_buffer.cc",
41    "pb_decoder.cc",
42    "producer.cc",
43    "reset_for_testing.h",
44    "stream_writer.cc",
45    "stream_writer.h",
46    "thread_utils.cc",
47    "tracing_session.cc",
48    "track_event.cc",
49  ]
50  defines = [ "PERFETTO_SHLIB_SDK_IMPLEMENTATION" ]
51}
52
53shared_library("libperfetto_c") {
54  deps = [
55    ":shared_lib",
56    "../../gn:default_deps",
57  ]
58  public_deps = [ "../../include/perfetto/public" ]
59}
60
61perfetto_unittest_source_set("unittests") {
62  testonly = true
63  deps = [
64    ":intern_map",
65    "../../gn:default_deps",
66    "../../gn:gtest_and_gmock",
67    "../base",
68    "../base:test_support",
69  ]
70  sources = [ "intern_map_unittest.cc" ]
71}
72