1# Copyright (c) 2021-2023 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/inner_include",
22    "$hiview_interfaces/inner_api/unified_collection",
23  ]
24}
25
26ohos_prebuilt_etc("hiview.cfg") {
27  source = "config/hiview.cfg"
28  relative_install_dir = "init"
29  part_name = "hiview"
30  subsystem_name = "hiviewdfx"
31}
32
33ohos_prebuilt_etc("log_type.json") {
34  source = "config/log_type.json"
35  relative_install_dir = "hiview"
36  part_name = "hiview"
37  subsystem_name = "hiviewdfx"
38}
39
40ohos_source_set("hiview_service") {
41  branch_protector_ret = "pac_ret"
42  sanitize = {
43    cfi = true
44    cfi_cross_dso = true
45    cfi_vcall_icall_only = true
46    debug = false
47  }
48  part_name = "hiview"
49  public_configs = [ ":hiview_service_config" ]
50
51  sources = [ "hiview_service.cpp" ]
52
53  deps = [
54    ":hiview.cfg",
55    ":log_type.json",
56    "$hiview_adapter/service:hiview_service_adapter",
57    "$hiview_base:hiviewbase",
58    "$hiview_core:hiview_core",
59    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_graphic",
60    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
61  ]
62
63  external_deps = [
64    "bundle_framework:appexecfwk_core",
65    "ffrt:libffrt",
66    "hilog:libhilog",
67    "hitrace:hitrace_dump",
68  ]
69}
70
71group("fuzztest") {
72  testonly = true
73  deps = [ "test/fuzztest/common/hiviewservice_fuzzer:HiviewServiceFuzzTest" ]
74}
75