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/hidumper/hidumper.gni") 15 16config("interface_include") { 17 include_dirs = [ 18 "${hidumper_interface}/innerkits/include", 19 "${hidumper_interface}/native/innerkits/include/", 20 ] 21} 22 23config("service_config") { 24 include_dirs = [ 25 "//commonlibrary/c_utils/base/include", 26 "//utils/system/safwk/native/include", 27 "native/include", 28 ] 29} 30 31config("zidl_config") { 32 include_dirs = [ 33 "//commonlibrary/c_utils/base/include", 34 "//utils/system/safwk/native/include", 35 "zidl/include", 36 ] 37} 38 39ohos_source_set("zidl_client") { 40 sources = [ "zidl/src/dump_broker_proxy.cpp" ] 41 42 configs = [ 43 "${hidumper_utils_path}:utils_config", 44 ":interface_include", 45 "${hidumper_service_path}:zidl_config", 46 ] 47 48 deps = [ "${hidumper_utils_path}:utils" ] 49 50 external_deps = [ 51 "c_utils:utils", 52 "eventhandler:libeventhandler", 53 "hilog_native:libhilog", 54 "hisysevent_native:libhisysevent", 55 "ipc:ipc_core", 56 "safwk:system_ability_fwk", 57 58 #"samgr_L2:samgr_proxy", 59 "samgr:samgr_proxy", 60 ] 61 62 subsystem_name = "${hidumper_subsystem_name}" 63 64 part_name = "${hidumper_part_name}" 65} 66 67ohos_source_set("zidl_service") { 68 sources = [ "zidl/src/dump_broker_stub.cpp" ] 69 70 configs = [ 71 "${hidumper_utils_path}:utils_config", 72 ":interface_include", 73 "${hidumper_service_path}:zidl_config", 74 ] 75 76 deps = [ "${hidumper_utils_path}:utils" ] 77 78 external_deps = [ 79 "c_utils:utils", 80 "eventhandler:libeventhandler", 81 "hilog_native:libhilog", 82 "hisysevent_native:libhisysevent", 83 "ipc:ipc_core", 84 "safwk:system_ability_fwk", 85 86 #"samgr_L2:samgr_proxy", 87 "samgr:samgr_proxy", 88 ] 89 90 subsystem_name = "${hidumper_subsystem_name}" 91 92 part_name = "${hidumper_part_name}" 93} 94 95ohos_source_set("hidumper_client") { 96 sources = [ 97 "native/src/dump_manager_client.cpp", 98 "native/src/dump_on_demand_load.cpp", 99 ] 100 101 configs = [ 102 "${hidumper_utils_path}:utils_config", 103 ":interface_include", 104 "${hidumper_frameworks_path}:hidumper_include", 105 "${hidumper_service_path}:service_config", 106 "${hidumper_service_path}:zidl_config", 107 ] 108 109 deps = [ 110 "${hidumper_service_path}:zidl_client", 111 "${hidumper_utils_path}:utils", 112 ] 113 114 external_deps = [ 115 "c_utils:utils", 116 "hilog_native:libhilog", 117 "ipc:ipc_core", 118 "samgr:samgr_proxy", 119 ] 120 121 subsystem_name = "${hidumper_subsystem_name}" 122 123 part_name = "${hidumper_part_name}" 124} 125 126ohos_source_set("hidumperservice_source") { 127 sources = [ 128 "native/src/dump_common_utils.cpp", 129 "native/src/dump_event_handler.cpp", 130 "native/src/dump_log_manager.cpp", 131 "native/src/dump_manager_service.cpp", 132 "native/src/raw_param.cpp", 133 ] 134 135 configs = [ 136 "${hidumper_utils_path}:utils_config", 137 ":interface_include", 138 "${hidumper_frameworks_path}:hidumper_include", 139 "${hidumper_service_path}:service_config", 140 "${hidumper_service_path}:zidl_config", 141 ] 142 143 deps = [ 144 "${hidumper_frameworks_path}:dump_main", 145 "${hidumper_service_path}:zidl_service", 146 "${hidumper_utils_path}:utils", 147 ] 148 149 external_deps = [ 150 "access_token:libtoken_setproc", 151 "c_utils:utils", 152 "eventhandler:libeventhandler", 153 "hilog_native:libhilog", 154 "hisysevent_native:libhisysevent", 155 "ipc:ipc_core", 156 "safwk:system_ability_fwk", 157 "samgr:samgr_proxy", 158 ] 159} 160 161ohos_shared_library("hidumperservice") { 162 deps = [ ":hidumperservice_source" ] 163 install_enable = true 164 version_script = "hidumper.map" 165 subsystem_name = "${hidumper_subsystem_name}" 166 part_name = "${hidumper_part_name}" 167} 168 169############################################################################ 170 171ohos_prebuilt_etc("hidumper_service.rc") { 172 source = "native/etc/hidumper_service.cfg" 173 174 relative_install_dir = "init" 175 176 subsystem_name = "${hidumper_subsystem_name}" 177 178 part_name = "${hidumper_part_name}" 179} 180 181ohos_prebuilt_etc("infos_config") { 182 source = "native/etc/infos_config.json" 183 184 relative_install_dir = "hidumper" 185 186 subsystem_name = "${hidumper_subsystem_name}" 187 188 part_name = "${hidumper_part_name}" 189} 190