1# Copyright (c) 2024 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/hiview/hiview.gni") 15import("//build/ohos.gni") 16 17config("crash_validator_config") { 18 visibility = [ "*:*" ] 19 include_dirs = [ 20 ".", 21 "include", 22 "$hiview_base/include", 23 "$hiview_core/include", 24 ] 25} 26 27ohos_prebuilt_etc("crashvalidator_plugin_config") { 28 source = "crashvalidator_plugin_config" 29 part_name = "hiview" 30 subsystem_name = "hiviewdfx" 31 relative_install_dir = "hiview" 32} 33 34ohos_shared_library("libcrashvalidator") { 35 part_name = "hiview" 36 subsystem_name = "hiviewdfx" 37 public_configs = [ ":crash_validator_config" ] 38 39 sanitize = { 40 cfi = true 41 cfi_cross_dso = true 42 debug = false 43 } 44 45 sources = [ "crash_validator.cpp" ] 46 47 deps = [ 48 ":crashvalidator_plugin_config", 49 "$hiview_base:hiviewbase", 50 "$hiview_plugin/faultlogger:libfaultlogger", 51 ] 52 53 external_deps = [ 54 "hilog:libhilog", 55 "hisysevent:libhisysevent", 56 "ipc:ipc_single", 57 ] 58} 59 60group("unittest") { 61 testonly = true 62 deps = [] 63} 64 65group("moduletest") { 66 testonly = true 67 deps = [] 68} 69