1# Copyright (c) 2021-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. 13 14import("//base/hiviewdfx/faultloggerd/faultloggerd.gni") 15 16dumpcatcher_sources = [ "dfx_dump_catcher.cpp" ] 17 18if (defined(ohos_lite)) { 19 shared_library("libdfx_dumpcatcher") { 20 visibility = [ "*:*" ] 21 22 include_dirs = [ 23 "include", 24 "$c_utils_include_path", 25 "$faultloggerd_common_path/dfxlog", 26 "$faultloggerd_common_path/dfxutil", 27 "$faultloggerd_interfaces_path/common", 28 "$faultloggerd_interfaces_path/innerkits/backtrace/include", 29 "$faultloggerd_interfaces_path/innerkits/faultloggerd_client/include", 30 "$faultloggerd_interfaces_path/innerkits/procinfo/include", 31 "$hilog_lite_include_path", 32 ] 33 34 sources = dumpcatcher_sources 35 36 cflags = [ "-fstack-protector-strong" ] 37 38 deps = [ 39 "$faultloggerd_common_path/dfxlog:dfx_hilog", 40 "$faultloggerd_common_path/dfxutil:dfx_util", 41 "$faultloggerd_common_path/trace:dfx_trace_dlsym", 42 "$faultloggerd_interfaces_path/innerkits/backtrace:libbacktrace_local", 43 "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd", 44 "$faultloggerd_interfaces_path/innerkits/procinfo:libdfx_procinfo", 45 ] 46 47 external_deps = [ 48 "bounds_checking_function:libsec_shared", 49 "hilog_lite:hilog_shared", 50 ] 51 } 52} else { 53 config("dfx_dump_catcher_config") { 54 visibility = [ "*:*" ] 55 include_dirs = [ "include" ] 56 } 57 58 ohos_shared_library("libdfx_dumpcatcher") { 59 branch_protector_ret = "pac_ret" 60 public_configs = [ 61 ":dfx_dump_catcher_config", 62 "$faultloggerd_path/common/build:coverage_flags", 63 ] 64 sources = dumpcatcher_sources 65 cflags = [ "-fstack-protector-strong" ] 66 include_dirs = [ "$faultloggerd_interfaces_path/common" ] 67 version_script = "libdfx_dumpcatcher.map" 68 deps = [ 69 "$faultloggerd_common_path/dfxlog:dfx_hilog", 70 "$faultloggerd_common_path/dfxutil:dfx_util", 71 "$faultloggerd_common_path/trace:dfx_trace_dlsym", 72 "$faultloggerd_interfaces_path/innerkits/backtrace:libbacktrace_local", 73 "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd", 74 "$faultloggerd_interfaces_path/innerkits/procinfo:libdfx_procinfo", 75 ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "hilog:libhilog", 80 ] 81 install_images = [ 82 "system", 83 "updater", 84 ] 85 innerapi_tags = [ 86 "chipsetsdk_indirect", 87 "platformsdk_indirect", 88 ] 89 part_name = "faultloggerd" 90 subsystem_name = "hiviewdfx" 91 } 92} 93