• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("../../ts.gni")
16ohos_source_set("hiperf_parser_src") {
17  sources = [ "perf_data_parser.cpp" ]
18  include_dirs = [
19    "hiperf/linux",
20    "hiperf/kernel",
21    ".",
22    "../../base",
23    "../../cfg",
24    "hiperf/include",
25    "../../include",
26    "../../",
27    "../../filter",
28    "../../trace_data",
29    "..",
30    "../htrace_parser",
31    "../../trace_streamer",
32    "//third_party/sqlite/include",
33    "${OHOS_PROTO_GEN}/types/plugins/memory_data",
34    "//third_party/protobuf/src",
35    "//third_party/perf_include",
36    "//third_party/perf_include/linux",
37    "//third_party/perf_include/include",
38  ]
39  include_dirs += [ "//third_party/libunwind/include" ]
40
41  if (enable_ts_utest && !use_wasm) {
42    cflags = [
43      "-fprofile-arcs",
44      "-ftest-coverage",
45    ]
46    ldflags = [
47      "-fprofile-arcs",
48      "-ftest-coverage",
49      "--coverage",
50    ]
51    if (is_macx && is_test) {
52      cflags += [ "-D UT_MAC" ]
53    }
54  }
55}
56
57group("hiperf_parser") {
58  deps = [
59    ":hiperf_parser_src",
60    "hiperf:hiperf",
61    "//third_party/protobuf:protobuf",
62    "//third_party/protobuf:protobuf_lite",
63  ]
64  if (target != "test" && !is_openharmony) {
65    deps += [ "//prebuilts/protos:ts_proto_data_cpp" ]
66  }
67}
68