1# Copyright (c) 2021-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. 13 14import("//build/ohos.gni") 15 16hicollie_part_path = "//base/hiviewdfx/hicollie" 17config("hicollie_include") { 18 include_dirs = [ 19 ".", 20 "${hicollie_part_path}/interfaces/native/innerkits/include/xcollie", 21 ] 22 if (is_ohos) { 23 cflags_cc = [ "-D__XCOLLIE_OHOS__" ] 24 } 25} 26 27ohos_source_set("libhicollie_source") { 28 branch_protector_ret = "pac_ret" 29 sources = [ 30 "handler_checker.cpp", 31 "watchdog.cpp", 32 "watchdog_inner.cpp", 33 "watchdog_task.cpp", 34 "xcollie.cpp", 35 "xcollie_utils.cpp", 36 ] 37 configs = [ ":hicollie_include" ] 38 39 external_deps = [ 40 "c_utils:utils", 41 "faultloggerd:libbacktrace_local", 42 "ffrt:libffrt", 43 "hilog:libhilog", 44 "hisysevent:libhisysevent", 45 "hiview:libucollection_client", 46 "init:libbegetutil", 47 "ipc:ipc_core", 48 "storage_service:storage_manager_acl", 49 ] 50 51 defines = [] 52 if (defined(global_parts_info) && 53 defined(global_parts_info.notification_eventhandler)) { 54 external_deps += [ "eventhandler:libeventhandler" ] 55 } 56 57 part_name = "hicollie" 58 subsystem_name = "hiviewdfx" 59} 60 61group("libhicollie") { 62 deps = [ ":libhicollie_source" ] 63} 64