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_src") { 17 sources = [ 18 "callstack.cpp", 19 "callstack.h", 20 "debug_logger.cpp", 21 "debug_logger.h", 22 "dwarf_encoding.cpp", 23 "dwarf_encoding.h", 24 "elf_file.cpp", 25 "elf_header.cpp", 26 "elf_symbol.cpp", 27 28 # "hashlist.hpp", 29 "hashlist.h", 30 "option.cpp", 31 "perf_event_record.cpp", 32 33 # "perf_events.cpp", 34 "perf_file_format.cpp", 35 "perf_file_reader.cpp", 36 "program_header.cpp", 37 "register.cpp", 38 "register.h", 39 "report.cpp", 40 41 # "ring_buffer.cpp", 42 "include/symbols_file.h", 43 "section_header.cpp", 44 "subcommand.cpp", 45 "symbols_file.cpp", 46 "utilities.cpp", 47 "virtual_runtime.cpp", 48 "virtual_thread.cpp", 49 ] 50 include_dirs = [ 51 "linux", 52 "kernel", 53 "../", 54 "./", 55 "../../../base", 56 "include", 57 "../../../include", 58 "../../../", 59 "../../../trace_streamer", 60 "//third_party/perf_include", 61 "//third_party/perf_include/linux", 62 "//third_party/perf_include/include", 63 ] 64 include_dirs += [ 65 "//third_party/libunwind/include", 66 "//third_party/libunwind/src", 67 "//third_party/libunwind/include/tdep-x86_64", 68 ] 69} 70 71group("hiperf") { 72 deps = [ 73 ":hiperf_src", 74 "//third_party/protobuf:protobuf", 75 "//third_party/protobuf:protobuf_lite", 76 ] 77 if (target != "test" && !is_openharmony) { 78 deps += [ "//prebuilts/protos:ts_proto_data_cpp" ] 79 } 80} 81