# Copyright (C) 2021 Huawei Device Co., Ltd. # 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("//build/ohos.gni") import("//src/ts.gni") ohos_source_set("parser") { sources = [ "bytrace_parser/bytrace_event_parser.cpp", "bytrace_parser/bytrace_event_parser.h", "bytrace_parser/bytrace_parser.cpp", "bytrace_parser/bytrace_parser.h", "common_types.h", "event_parser_base.cpp", "event_parser_base.h", "print_event_parser.cpp", "print_event_parser.h", "thread_state.cpp", "thread_state.h", ] deps = [ "ebpf_parser:ebpf_parser", "htrace_parser:htrace_parser", ] include_dirs = [ "//third_party/protobuf/src", "${OHOS_PROTO_GEN}/types/plugins/memory_data", "${OHOS_PROTO_GEN}/types/plugins/ftrace_data/${kernel_version}", "${OHOS_PROTO_GEN}/types/plugins/hilog_data", "${OHOS_PROTO_GEN}/types/plugins/native_hook", "${OHOS_PROTO_GEN}/types/plugins/hidump_data", "${OHOS_PROTO_GEN}/types/plugins/network_data", "${OHOS_PROTO_GEN}/types/plugins/cpu_data", "${OHOS_PROTO_GEN}/types/plugins/diskio_data", "${OHOS_PROTO_GEN}/types/plugins/hisysevent_data", "${OHOS_PROTO_GEN}/types/plugins/process_data", "${OHOS_PROTO_GEN}/types/plugins/", "${OHOS_PROTO_GEN}", "//third_party/sqlite/include", "//src/base", "//src/cfg", "//src/trace_streamer", "//src/trace_data", "//src/include", "//src/filter", "//src", ".", "//third_party/json-master/include", "//third_party/json-master/include/nlohmann", ] if (enable_ts_utest && !use_wasm) { cflags = [ "-fprofile-arcs", "-ftest-coverage", ] ldflags = [ "-fprofile-arcs", "-ftest-coverage", "--coverage", ] if (is_macx && is_test) { cflags += [ "-D UT_MAC" ] } } }