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("crasher_cpp") { 18 cflags = [ "-funwind-tables" ] 19 visibility = [ "*:*" ] 20 include_dirs = [ 21 ".", 22 "$faultloggerd_path/common", 23 "$faultloggerd_path/tools/process_dump/", 24 "//commonlibrary/c_utils/base/include", 25 "$hilog_lite_include_path", 26 ] 27 sources = [ "dfx_crasher.cpp" ] 28 deps = [ 29 "$hilog_lite_deps_path", 30 "//third_party/bounds_checking_function:libsec_shared", 31 ] 32 } 33} else { 34 config("crasher_config") { 35 visibility = [ ":*" ] 36 37 include_dirs = [ 38 ".", 39 "$faultloggerd_path/tools/process_dump/", 40 "//commonlibrary/c_utils/base/include", 41 ] 42 43 cflags = [ "-DHAS_HITRACE" ] 44 } 45 46 ohos_executable("crasher_cpp") { 47 configs = [ ":crasher_config" ] 48 sources = [ "dfx_crasher.cpp" ] 49 50 external_deps = [ 51 "c_utils:utils", 52 "hilog_native:libhilog", 53 "hitrace_native:libhitracechain", 54 ] 55 56 part_name = "faultloggerd" 57 subsystem_name = "hiviewdfx" 58 } 59} 60