1# Copyright (c) 2023 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. 13import("//build/ohos.gni") 14import("//build/ts.gni") 15config("faultloggerd_config") { 16 cflags = [ 17 "-D ALWAYSTRUE", 18 "-D DFX_NO_PRINT_LOG", 19 "-D is_host", 20 ] 21 if (!is_independent_compile) { 22 configs = [ "${TS_DIR}/gn:ts_config" ] 23 } 24} 25config("faultloggerd_public_config") { 26 include_dirs = [ 27 "faultloggerd/common/dfxlog", 28 "faultloggerd/common/dfxutil", 29 "faultloggerd/interfaces/common", 30 "faultloggerd/interfaces/nonlinux", 31 "faultloggerd/interfaces/innerkits/unwinder/include", 32 "${THIRD_PARTY}/hiperf/include", 33 "${THIRD_PARTY}/hiperf/include/nonlinux", 34 "${THIRD_PARTY}/hiperf/include/nonlinux/linux", 35 "${THIRD_PARTY}/bounds_checking_function/include", 36 "${COMMON_LIBRARY}/base/include", 37 ] 38 if (is_mingw) { 39 include_dirs += [ "${THIRD_PARTY}/libunwind/include/mingw" ] 40 } 41} 42ohos_source_set("libfaultloggerd") { 43 sources = [ 44 "faultloggerd/common/dfxutil/dfx_util.cpp", 45 "faultloggerd/interfaces/innerkits/unwinder/dfx_elf.cpp", 46 "faultloggerd/interfaces/innerkits/unwinder/dfx_elf_parser.cpp", 47 "faultloggerd/interfaces/innerkits/unwinder/dfx_map.cpp", 48 "faultloggerd/interfaces/innerkits/unwinder/dfx_maps.cpp", 49 "faultloggerd/interfaces/innerkits/unwinder/dfx_memory.cpp", 50 "faultloggerd/interfaces/innerkits/unwinder/dfx_mmap.cpp", 51 "faultloggerd/interfaces/innerkits/unwinder/dfx_symbols.cpp", 52 "faultloggerd/interfaces/innerkits/unwinder/unwinder_config.cpp", 53 ] 54 configs += [ ":faultloggerd_config" ] 55 public_configs = [ ":faultloggerd_public_config" ] 56 public_deps = [ "${THIRD_PARTY}/bounds_checking_function:libsec_static" ] 57 part_name = "faultloggerd" 58 subsystem_name = "thirdparty" 59} 60