xref: /aosp_15_r20/external/perfetto/src/profiling/symbolizer/BUILD.gn (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2019 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/perfetto.gni")
16import("../../../gn/test.gni")
17
18source_set("symbolizer") {
19  public_deps = [ "../../../include/perfetto/ext/base" ]
20  deps = [ "../../../gn:default_deps" ]
21  sources = [
22    "breakpad_parser.cc",
23    "breakpad_parser.h",
24    "breakpad_symbolizer.cc",
25    "breakpad_symbolizer.h",
26    "elf.h",
27    "filesystem.h",
28    "filesystem_posix.cc",
29    "filesystem_windows.cc",
30    "local_symbolizer.cc",
31    "local_symbolizer.h",
32    "subprocess.h",
33    "subprocess_posix.cc",
34    "subprocess_windows.cc",
35    "symbolizer.cc",
36    "symbolizer.h",
37  ]
38}
39
40if (enable_perfetto_trace_processor) {
41  source_set("symbolize_database") {
42    public_deps = [
43      ":symbolizer",
44      "../../../include/perfetto/ext/base",
45    ]
46    deps = [
47      "../../../gn:default_deps",
48      "../../../include/perfetto/protozero",
49      "../../../include/perfetto/trace_processor:trace_processor",
50      "../../../protos/perfetto/trace:zero",
51      "../../../protos/perfetto/trace/profiling:zero",
52      "../../trace_processor/util:build_id",
53    ]
54    sources = [
55      "symbolize_database.cc",
56      "symbolize_database.h",
57    ]
58  }
59}
60
61perfetto_unittest_source_set("unittests") {
62  testonly = true
63  deps = [
64    ":symbolizer",
65    "../../../gn:default_deps",
66    "../../../gn:gtest_and_gmock",
67    "../../base:test_support",
68  ]
69  sources = [
70    "breakpad_parser_unittest.cc",
71    "breakpad_symbolizer_unittest.cc",
72    "local_symbolizer_unittest.cc",
73  ]
74}
75