1# Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved. 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") 15import("//developtools/profiler/hidebug/hidebug.gni") 16 17ohos_source_set("libhidebug_source") { 18 part_name = "${OHOS_PROFILER_PART_NAME}" 19 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 20 include_dirs = [ "../../interfaces/native/innerkits/include" ] 21 if (build_variant == "root") { 22 defines = [ "HIDEBUG_BUILD_VARIANT_ROOT" ] 23 } 24 sources = [ "hidebug_base.c" ] 25 26 external_deps = [ 27 "c_utils:utils", 28 "hichecker:libhichecker", 29 "hilog:libhilog", 30 "init:libbegetutil", 31 ] 32} 33 34ohos_source_set("libhidebug_init_source") { 35 part_name = "${OHOS_PROFILER_PART_NAME}" 36 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 37 defines = [ "HIDEBUG_IN_INIT" ] 38 39 include_dirs = [ "../../interfaces/native/innerkits/include" ] 40 if (build_variant == "root") { 41 defines += [ "HIDEBUG_BUILD_VARIANT_ROOT" ] 42 } 43 external_deps = [ 44 "bounds_checking_function:libsec_static", 45 "cJSON:cjson", 46 "init:libinit_module_engine", 47 ] 48 sources = [ "hidebug_base.c" ] 49} 50 51ohos_shared_library("hidebug_native") { 52 part_name = "${OHOS_PROFILER_PART_NAME}" 53 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 54 include_dirs = [ 55 "../../interfaces/native/kits/include", 56 "include", 57 ] 58 59 sources = [ 60 "src/hiappevent_util.cpp", 61 "src/hidebug_app_thread_cpu.cpp", 62 "src/hidebug_native_interface_impl.cpp", 63 "src/hidebug_util.cpp", 64 ] 65 66 external_deps = [ 67 "ability_runtime:app_context", 68 "c_utils:utils", 69 "ffrt:libffrt", 70 "hiappevent:hiappevent_innerapi", 71 "hidumper:lib_dump_usage", 72 "hilog:libhilog", 73 "hitrace:hitrace_meter", 74 "hiview:libucollection_client", 75 "hiview:libucollection_utility", 76 "init:libbegetutil", 77 "ipc:ipc_single", 78 "storage_service:storage_manager_acl", 79 ] 80} 81