1# Copyright (c) 2021 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 16if (defined(ohos_lite)) { 17 executable("dumpcatcher") { 18 visibility = [ "*:*" ] 19 include_dirs = [ 20 ".", 21 "$faultloggerd_path/common", 22 "$faultloggerd_path/common/dfxlog", 23 "$faultloggerd_path/utils", 24 "//commonlibrary/c_utils/base/include", 25 "$faultloggerd_path/tools/process_dump/", 26 "$faultloggerd_path/interfaces/innerkits/dump_catcher/include", 27 "$hilog_lite_include_path", 28 ] 29 sources = [ 30 "dump_catcher.cpp", 31 "main.cpp", 32 ] 33 deps = [ 34 "$faultloggerd_path/common/dfxlog:static_common_log", 35 "$faultloggerd_path/interfaces/innerkits/dump_catcher:lib_dfx_dump_catcher", 36 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 37 "//third_party/bounds_checking_function:libsec_shared", 38 ] 39 } 40} else { 41 config("dumpcatcher_config") { 42 visibility = [ ":*" ] 43 44 include_dirs = [ 45 ".", 46 "//base/hiviewdfx/faultloggerd/common", 47 "$faultloggerd_path/tools/process_dump/", 48 "//base/hiviewdfx/faultloggerd/common/dfxlog", 49 "//commonlibrary/c_utils/base/include", 50 "$faultloggerd_path/interfaces/innerkits/dump_catcher/include", 51 ] 52 } 53 54 ohos_executable("dumpcatcher") { 55 install_enable = true 56 configs = [ ":dumpcatcher_config" ] 57 sources = [ 58 "dump_catcher.cpp", 59 "main.cpp", 60 ] 61 62 cflags_cc = [ "-DDEBUG_CRASH_LOCAL_HANDLER" ] 63 64 deps = [ 65 "$faultloggerd_path/common/dfxlog:static_common_log", 66 "$faultloggerd_path/common/util:dfx_cutil", 67 "$faultloggerd_path/interfaces/innerkits/dump_catcher:lib_dfx_dump_catcher", 68 "$faultloggerd_path/interfaces/innerkits/signal_handler:dfx_local_handler", 69 ] 70 71 external_deps = [ 72 "c_utils:utils", 73 "hilog_native:libhilog", 74 ] 75 76 install_images = [ 77 "system", 78 "updater", 79 ] 80 81 part_name = "faultloggerd" 82 subsystem_name = "hiviewdfx" 83 } 84} 85