# Copyright (c) 2021-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("//base/hiviewdfx/faultloggerd/faultloggerd.gni") dumpcatcher_sources = [ "dfx_dump_catcher.cpp" ] if (defined(ohos_lite)) { shared_library("libdfx_dumpcatcher") { visibility = [ "*:*" ] include_dirs = [ "include", "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", "$faultloggerd_interfaces_path/innerkits/backtrace/include", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client/include", "$faultloggerd_interfaces_path/innerkits/procinfo/include", "$hilog_lite_include_path", ] sources = dumpcatcher_sources cflags = [ "-fstack-protector-strong" ] deps = [ "$faultloggerd_common_path/dfxlog:dfx_hilog", "$faultloggerd_common_path/dfxutil:dfx_util", "$faultloggerd_common_path/trace:dfx_trace_dlsym", "$faultloggerd_interfaces_path/innerkits/backtrace:libbacktrace_local", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd", "$faultloggerd_interfaces_path/innerkits/procinfo:libdfx_procinfo", ] external_deps = [ "bounds_checking_function:libsec_shared", "hilog_lite:hilog_shared", ] } } else { config("dfx_dump_catcher_config") { visibility = [ "*:*" ] include_dirs = [ "include" ] } ohos_shared_library("libdfx_dumpcatcher") { branch_protector_ret = "pac_ret" public_configs = [ ":dfx_dump_catcher_config", "$faultloggerd_path/common/build:coverage_flags", ] sources = dumpcatcher_sources cflags = [ "-fstack-protector-strong" ] include_dirs = [ "$faultloggerd_interfaces_path/common" ] version_script = "libdfx_dumpcatcher.map" deps = [ "$faultloggerd_common_path/dfxlog:dfx_hilog", "$faultloggerd_common_path/dfxutil:dfx_util", "$faultloggerd_common_path/trace:dfx_trace_dlsym", "$faultloggerd_interfaces_path/innerkits/backtrace:libbacktrace_local", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd", "$faultloggerd_interfaces_path/innerkits/procinfo:libdfx_procinfo", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] install_images = [ "system", "updater", ] innerapi_tags = [ "chipsetsdk_indirect", "platformsdk_indirect", ] part_name = "faultloggerd" subsystem_name = "hiviewdfx" } }