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_core_config") {
17  visibility = [ "*:*" ]
18  include_dirs = [
19    "include",
20    "$hiview_core/param_update/include",
21    "$hiview_root/include",
22  ]
23  cflags_cc = [ "-D__HIVIEW_OHOS__" ]
24}
25
26ohos_source_set("hiview_core") {
27  branch_protector_ret = "pac_ret"
28  sanitize = {
29    cfi = true
30    cfi_cross_dso = true
31    cfi_vcall_icall_only = true
32    debug = false
33  }
34  part_name = "hiview"
35  public_configs = [ ":hiview_core_config" ]
36
37  sources = [
38    "hiview_platform.cpp",
39    "plugin_bundle.cpp",
40    "plugin_config.cpp",
41  ]
42
43  deps = [
44    "$hiview_base:hiviewbase",
45    "param_update:hiview_param_update",
46    "platform_config:hiviewplatform_config",
47  ]
48
49  external_deps = [
50    "faultloggerd:libbacktrace_local",
51    "ffrt:libffrt",
52    "hicollie:libhicollie",
53    "hilog:libhilog",
54    "hisysevent:libhisysevent",
55    "init:libbeget_proxy",
56    "init:libbegetutil",
57    "ipc:ipc_single",
58  ]
59}
60
61ohos_source_set("hiview_core_for_test") {
62  part_name = "hiview"
63  public_configs = [ ":hiview_core_config" ]
64
65  sources = [
66    "hiview_platform.cpp",
67    "plugin_bundle.cpp",
68    "plugin_config.cpp",
69  ]
70
71  deps = [
72    "$hiview_base:hiviewbase",
73    "param_update:hiview_param_update_for_tdd",
74    "platform_config:hiviewplatform_config_for_tdd",
75  ]
76
77  external_deps = [
78    "faultloggerd:libbacktrace_local",
79    "ffrt:libffrt",
80    "hicollie:libhicollie",
81    "hilog:libhilog",
82    "hisysevent:libhisysevent",
83    "init:libbeget_proxy",
84    "init:libbegetutil",
85    "ipc:ipc_single",
86  ]
87}
88
89group("unittest") {
90  testonly = true
91  deps = []
92}
93
94group("moduletest") {
95  testonly = true
96  deps = []
97}
98