# Copyright (c) 2021-2022 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("//base/hiviewdfx/faultloggerd/faultloggerd.gni") if (defined(ohos_lite)) { shared_library("lib_dfx_dump_catcher") { visibility = [ "*:*" ] include_dirs = [ "include", "//commonlibrary/c_utils/base/include", "$faultloggerd_path/common", "$faultloggerd_path/common/dfxlog", "$faultloggerd_path/common/util", "//third_party/libunwind/include", "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/include", "$faultloggerd_path/tools/process_dump", "$hilog_lite_include_path", ] defines = [ "HAVE_CONFIG_H", "HAVE_ELF_H", "HAVE_LINK_H", ] sources = [ "$faultloggerd_path/tools/process_dump/dfx_dump_request.cpp", "$faultloggerd_path/tools/process_dump/dfx_dump_res.cpp", "$faultloggerd_path/tools/process_dump/dfx_elf.cpp", "$faultloggerd_path/tools/process_dump/dfx_frame.cpp", "$faultloggerd_path/tools/process_dump/dfx_logger.cpp", "$faultloggerd_path/tools/process_dump/dfx_maps.cpp", "$faultloggerd_path/tools/process_dump/dfx_symbols_cache.cpp", "$faultloggerd_path/tools/process_dump/dfx_unwind_local.cpp", "$faultloggerd_path/tools/process_dump/dfx_util.cpp", "$faultloggerd_path/utils/directory_ex.cpp", "$faultloggerd_path/utils/file_ex.cpp", "dfx_dump_catcher.cpp", ] deps = [ "$faultloggerd_path/common/dfxlog:static_common_log", "$faultloggerd_path/common/util:dfx_cutil", "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd", "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", "//third_party/libunwind:libunwind", ] } } else { config("dfx_dump_catcher_config") { visibility = [ "*:*" ] include_dirs = [ "include", "//commonlibrary/c_utils/base/include", "$faultloggerd_path/common", "$faultloggerd_path/common/dfxlog", "//third_party/libunwind/include", "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/include", "$faultloggerd_path/tools/process_dump", ] } ohos_shared_library("lib_dfx_dump_catcher") { public_configs = [ ":dfx_dump_catcher_config" ] sources = [ "$faultloggerd_path/tools/process_dump/dfx_dump_request.cpp", "$faultloggerd_path/tools/process_dump/dfx_dump_res.cpp", "$faultloggerd_path/tools/process_dump/dfx_elf.cpp", "$faultloggerd_path/tools/process_dump/dfx_frame.cpp", "$faultloggerd_path/tools/process_dump/dfx_logger.cpp", "$faultloggerd_path/tools/process_dump/dfx_maps.cpp", "$faultloggerd_path/tools/process_dump/dfx_symbols_cache.cpp", "$faultloggerd_path/tools/process_dump/dfx_unwind_local.cpp", "$faultloggerd_path/tools/process_dump/dfx_util.cpp", "dfx_dump_catcher.cpp", ] deps = [ "$faultloggerd_path/common/dfxlog:static_common_log", "$faultloggerd_path/common/util:dfx_cutil", "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd", "//third_party/libunwind:libunwind", ] external_deps = [ "c_utils:utils", "hilog_native:libhilog", ] install_images = [ "system", "updater", ] part_name = "faultloggerd" subsystem_name = "hiviewdfx" } }