• 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/utils/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  public_configs = [ ":hiview_service_config" ]
52
53  sources = [ "hiview_service.cpp" ]
54
55  deps = [
56    ":hiview.cfg",
57    ":log_type.json",
58    "$hiview_adapter/service:hiview_service_adapter",
59    "$hiview_base:hiviewbase",
60    "$hiview_core:hiview_core",
61    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
62  ]
63
64  if (hiview_unified_collector_trace_enable) {
65    deps += [ "$hiview_framework/native/unified_collection/trace_manager:libtrace_manager" ]
66    defines = [ "UNIFIED_COLLECTOR_TRACE_ENABLE" ]
67  }
68
69  external_deps = [
70    "ability_base:base",
71    "ability_base:want",
72    "bundle_framework:appexecfwk_core",
73    "ffrt:libffrt",
74    "hilog:libhilog",
75    "jsoncpp:jsoncpp",
76    "zlib:libz",
77  ]
78}
79
80group("fuzztest") {
81  testonly = true
82  deps = [ "test/fuzztest/common/hiviewservice_fuzzer:HiviewServiceFuzzTest" ]
83}
84