1# Copyright (c) 2022 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. 13import("//base/hiviewdfx/hiview/hiview.gni") 14import("//build/ohos.gni") 15 16config("bbox_detector_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 ".", 20 "include", 21 "$hiview_root/utility/smart_parser", 22 "$hiview_root/utility/common_utils/include", 23 ] 24} 25 26ohos_source_set("bbox_detector") { 27 part_name = "hiview" 28 subsystem_name = "hiviewdfx" 29 sources = [ 30 "bbox_detector_plugin.cpp", 31 "hisysevent_util.cpp", 32 "panic_report_recovery.cpp", 33 ] 34 35 configs = [ ":bbox_detector_config" ] 36 37 external_deps = [ 38 "bounds_checking_function:libsec_shared", 39 "hilog:libhilog", 40 "hisysevent:libhisysevent", 41 "init:libbegetutil", 42 "libxml2:libxml2", 43 "zlib:shared_libz", 44 ] 45 46 deps = [ 47 "$hiview_base:hiviewbase", 48 "config:config", 49 ] 50} 51 52ohos_source_set("bbox_detector_with_cfi") { 53 sanitize = { 54 cfi = true 55 cfi_cross_dso = true 56 cfi_vcall_icall_only = true 57 debug = false 58 } 59 part_name = "hiview" 60 subsystem_name = "hiviewdfx" 61 sources = [ 62 "bbox_detector_plugin.cpp", 63 "hisysevent_util.cpp", 64 "panic_report_recovery.cpp", 65 ] 66 67 configs = [ ":bbox_detector_config" ] 68 69 external_deps = [ 70 "bounds_checking_function:libsec_shared", 71 "hilog:libhilog", 72 "hisysevent:libhisysevent", 73 "init:libbegetutil", 74 "libxml2:libxml2", 75 "zlib:shared_libz", 76 ] 77 78 deps = [ 79 "$hiview_base:hiviewbase", 80 "config:config", 81 ] 82} 83 84group("unittest") { 85 testonly = true 86 deps = [ "test:BBoxDetectorUnitTest" ] 87} 88 89group("moduletest") { 90 testonly = true 91 deps = [ "test:BBoxDetectorModuleTest" ] 92} 93