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 "init:libinit_module_engine", 46 ] 47 sources = [ "hidebug_base.c" ] 48} 49 50ohos_shared_library("hidebug_native") { 51 part_name = "${OHOS_PROFILER_PART_NAME}" 52 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 53 include_dirs = [ 54 "../../interfaces/native/kits/include", 55 "include", 56 ] 57 58 sources = [ 59 "src/hidebug_app_thread_cpu.cpp", 60 "src/hidebug_native_interface_impl.cpp", 61 "src/hidebug_util.cpp", 62 ] 63 64 external_deps = [ 65 "ability_runtime:app_context", 66 "c_utils:utils", 67 "hidumper:lib_dump_usage", 68 "hilog:libhilog", 69 "hitrace:hitrace_meter", 70 "hiview:libucollection_client", 71 "hiview:libucollection_utility", 72 "init:libbegetutil", 73 ] 74} 75