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("../../hidumper.gni") 15 16config("dump_usage_config") { 17 visibility = [ "*:*" ] 18 19 include_dirs = [ 20 "include", 21 "${hidumper_frameworks_path}", 22 "${hidumper_frameworks_path}/include", 23 "${hidumper_utils_path}/native/include", 24 "${hidumper_interface}/innerkits/include", 25 ] 26} 27 28ohos_shared_library("lib_dump_usage") { 29 branch_protector_ret = "pac_ret" 30 public_configs = [ ":dump_usage_config" ] 31 32 sources = [ 33 "${hidumper_frameworks_path}/src/executor/memory/dma_info.cpp", 34 "${hidumper_frameworks_path}/src/executor/memory/memory_util.cpp", 35 "${hidumper_frameworks_path}/src/executor/memory/parse/parse_smaps_rollup_info.cpp", 36 "${hidumper_frameworks_path}/src/util/file_utils.cpp", 37 "${hidumper_frameworks_path}/src/util/string_utils.cpp", 38 "../../interfaces/innerkits/dump_usage.cpp", 39 ] 40 41 defines = [] 42 if (hidumper_hiviewdfx_hiview_enable) { 43 defines += [ "HIDUMPER_HIVIEWDFX_HIVIEW_ENABLE" ] 44 } 45 46 deps = [ "${hidumper_service_path}:hidumper_client" ] 47 48 external_deps = [ 49 "c_utils:utils", 50 "hilog:libhilog", 51 "hiview:libucollection_utility", 52 "ipc:ipc_core", 53 "safwk:system_ability_fwk", 54 "samgr:samgr_proxy", 55 ] 56 version_script = "libdumpusage.map" 57 subsystem_name = "hiviewdfx" 58 innerapi_tags = [ "platformsdk" ] 59 part_name = "hidumper" 60} 61