# Copyright (c) 2021 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)) { executable("dumpcatcher") { visibility = [ "*:*" ] include_dirs = [ ".", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/common/dfxlog", "$faultloggerd_path/common/dfxutil", "$faultloggerd_path/interfaces/innerkits/dump_catcher/include", "$hilog_lite_include_path", ] sources = [ "dump_catcher.cpp", "main.cpp", ] deps = [ "$faultloggerd_path/common/dfxlog:dfx_hilog", "$faultloggerd_path/common/dfxutil:dfx_util", "$faultloggerd_path/interfaces/innerkits/dump_catcher:libdfx_dumpcatcher", ] external_deps = [ "bounds_checking_function:libsec_shared", "hilog_lite:hilog_shared", ] } } else { config("dumpcatcher_config") { visibility = [ ":*" ] include_dirs = [ ".", "$faultloggerd_interfaces_path/common", "$faultloggerd_path/interfaces/innerkits/signal_handler", ] } ohos_executable("dumpcatcher") { if (build_variant == "root") { configs = [ ":dumpcatcher_config", "$faultloggerd_path/common/build:coverage_flags", ] sources = [ "dump_catcher.cpp", "main.cpp", ] cflags_cc = [ "-DDEBUG_CRASH_LOCAL_HANDLER" ] deps = [ "$faultloggerd_frameworks_path/localhandler:dfx_local_handler_src", "$faultloggerd_path/common/dfxlog:dfx_hilog", "$faultloggerd_path/common/dfxutil:dfx_util", "$faultloggerd_path/interfaces/innerkits/dump_catcher:libdfx_dumpcatcher", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } else { sources = [ "dummy_dumpcatcher.cpp" ] } install_images = [ "system", "updater", ] part_name = "faultloggerd" subsystem_name = "hiviewdfx" } }