# Copyright (c) 2023 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("//build/ts.gni") config("faultloggerd_config") { cflags = [ "-D ALWAYSTRUE", "-D DFX_NO_PRINT_LOG", "-D is_host", ] if (!is_independent_compile) { configs = [ "${TS_DIR}/gn:ts_config" ] } } config("faultloggerd_public_config") { include_dirs = [ "faultloggerd/common/dfxlog", "faultloggerd/common/dfxutil", "faultloggerd/interfaces/common", "faultloggerd/interfaces/nonlinux", "faultloggerd/interfaces/innerkits/unwinder/include", "${THIRD_PARTY}/hiperf/include", "${THIRD_PARTY}/hiperf/include/nonlinux", "${THIRD_PARTY}/hiperf/include/nonlinux/linux", "${THIRD_PARTY}/bounds_checking_function/include", "${COMMON_LIBRARY}/base/include", ] if (is_mingw) { include_dirs += [ "${THIRD_PARTY}/libunwind/include/mingw" ] } } ohos_source_set("libfaultloggerd") { sources = [ "faultloggerd/common/dfxutil/dfx_util.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_elf.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_elf_parser.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_map.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_maps.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_memory.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_mmap.cpp", "faultloggerd/interfaces/innerkits/unwinder/dfx_symbols.cpp", "faultloggerd/interfaces/innerkits/unwinder/unwinder_config.cpp", ] configs += [ ":faultloggerd_config" ] public_configs = [ ":faultloggerd_public_config" ] public_deps = [ "${THIRD_PARTY}/bounds_checking_function:libsec_static" ] part_name = "faultloggerd" subsystem_name = "thirdparty" }