• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2024 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.
13import("//base/hiviewdfx/hiview/hiview.gni")
14import("//build/ohos.gni")
15
16config("hiview_service_config") {
17  visibility = [ "*:*" ]
18
19  include_dirs = [
20    ".",
21    "$hiview_framework/native/unified_collection/collector/impl/trace/include",
22    "$hiview_framework/native/unified_collection/collector/impl/trace/strategy/include",
23    "$hiview_framework/native/unified_collection/collector/inner_include",
24    "$hiview_interfaces/inner_api/unified_collection",
25  ]
26}
27
28ohos_prebuilt_etc("hiview.cfg") {
29  source = "config/hiview.cfg"
30  relative_install_dir = "init"
31  part_name = "hiview"
32  subsystem_name = "hiviewdfx"
33}
34
35ohos_prebuilt_etc("log_type.json") {
36  source = "config/log_type.json"
37  relative_install_dir = "hiview"
38  part_name = "hiview"
39  subsystem_name = "hiviewdfx"
40}
41
42ohos_source_set("hiview_service") {
43  branch_protector_ret = "pac_ret"
44  sanitize = {
45    cfi = true
46    cfi_cross_dso = true
47    cfi_vcall_icall_only = true
48    debug = false
49  }
50  part_name = "hiview"
51  subsystem_name = "hiviewdfx"
52  public_configs = [ ":hiview_service_config" ]
53
54  sources = [ "hiview_service.cpp" ]
55
56  deps = [
57    ":hiview.cfg",
58    ":log_type.json",
59    "$hiview_adapter/service:hiview_service_adapter",
60    "$hiview_base:hiviewbase",
61    "$hiview_core:hiview_core",
62    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
63  ]
64
65  if (hiview_unified_collector_trace_enable) {
66    deps += [ "$hiview_framework/native/unified_collection/trace_manager:libtrace_manager" ]
67    defines = [ "UNIFIED_COLLECTOR_TRACE_ENABLE" ]
68  }
69
70  external_deps = [
71    "ability_base:base",
72    "ability_base:want",
73    "bundle_framework:appexecfwk_core",
74    "cJSON:cjson",
75    "c_utils:utils",
76    "ffrt:libffrt",
77    "hilog:libhilog",
78    "hisysevent:libhisysevent",
79    "ipc:ipc_single",
80    "jsoncpp:jsoncpp",
81    "zlib:libz",
82  ]
83}
84
85group("fuzztest") {
86  testonly = true
87  deps = [ "test/fuzztest/common/hiviewservice_fuzzer:HiviewServiceFuzzTest" ]
88}
89