• 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("faultlogger_service_adapter_config") {
17  visibility = [ "*:*" ]
18
19  include_dirs = [ "." ]
20}
21
22ohos_source_set("faultlogger_service_ability") {
23  part_name = "hiview"
24  include_dirs = [
25    "$hiview_plugin/faultlogger/common",
26    "$hiview_plugin/faultlogger/service",
27  ]
28
29  public_configs = [ ":faultlogger_service_adapter_config" ]
30
31  sources = [ "faultlogger_adapter.cpp" ]
32
33  deps = [
34    "$hiview_base:hiviewbase",
35    "idl:faultlogger_service_impl",
36  ]
37
38  external_deps = [
39    "hilog:libhilog",
40    "ipc:ipc_single",
41    "jsoncpp:jsoncpp",
42    "safwk:system_ability_fwk",
43    "samgr:samgr_proxy",
44  ]
45}
46
47ohos_source_set("faultlogger_service_ability_with_cfi") {
48  part_name = "hiview"
49  sanitize = {
50    cfi = true
51    cfi_cross_dso = true
52    cfi_vcall_icall_only = true
53    debug = false
54  }
55
56  include_dirs = [
57    "$hiview_plugin/faultlogger/common",
58    "$hiview_plugin/faultlogger/service",
59  ]
60
61  public_configs = [ ":faultlogger_service_adapter_config" ]
62
63  sources = [ "faultlogger_adapter.cpp" ]
64
65  deps = [
66    "$hiview_base:hiviewbase",
67    "idl:faultlogger_service_impl_with_cfi",
68  ]
69
70  external_deps = [
71    "hilog:libhilog",
72    "ipc:ipc_single",
73    "jsoncpp:jsoncpp",
74    "safwk:system_ability_fwk",
75    "samgr:samgr_proxy",
76  ]
77}
78
79ohos_source_set("faultlogger_service") {
80  part_name = "hiview"
81  include_dirs = [
82    ".",
83    "$hiview_plugin/faultlogger/common",
84    "$hiview_plugin/faultlogger/service/sanitizer_collector",
85    "$hiview_framework/native/unified_collection/process/include",
86  ]
87
88  sources = [
89    "dfx_bundle_util.cpp",
90    "faultlog_database.cpp",
91    "faultlog_formatter.cpp",
92    "faultlog_manager.cpp",
93    "faultlogger.cpp",
94    "freeze_json_generator.cpp",
95  ]
96
97  deps = [
98    ":faultlogger_service_ability",
99    "$hiview_base:hiviewbase",
100    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
101    "$hiview_plugin/faultlogger/common:faultlogger_common",
102    "$hiview_plugin/faultlogger/common:log_analyzer",
103  ]
104
105  external_deps = [
106    "access_token:libaccesstoken_sdk",
107    "bounds_checking_function:libsec_shared",
108    "bundle_framework:appexecfwk_base",
109    "bundle_framework:appexecfwk_core",
110    "c_utils:utils",
111    "faultloggerd:crash_exception",
112    "ffrt:libffrt",
113    "hilog:libhilog",
114    "hisysevent:libhisysevent",
115    "init:libbegetutil",
116    "ipc:ipc_single",
117    "jsoncpp:jsoncpp",
118    "safwk:system_ability_fwk",
119    "samgr:samgr_proxy",
120  ]
121}
122
123ohos_source_set("faultlogger_service_with_cfi") {
124  sanitize = {
125    cfi = true
126    cfi_cross_dso = true
127    cfi_vcall_icall_only = true
128    debug = false
129  }
130  part_name = "hiview"
131  include_dirs = [
132    "$hiview_plugin/faultlogger/common",
133    "$hiview_plugin/faultlogger/service/sanitizer_collector",
134    "$hiview_framework/native/unified_collection/process/include",
135  ]
136
137  sources = [
138    "dfx_bundle_util.cpp",
139    "faultlog_database.cpp",
140    "faultlog_formatter.cpp",
141    "faultlog_manager.cpp",
142    "faultlogger.cpp",
143    "freeze_json_generator.cpp",
144  ]
145
146  deps = [
147    ":faultlogger_service_ability_with_cfi",
148    "$hiview_base:hiviewbase",
149    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
150    "$hiview_plugin/faultlogger/common:faultlogger_common_with_cfi",
151    "$hiview_plugin/faultlogger/common:log_analyzer_with_cfi",
152  ]
153
154  external_deps = [
155    "access_token:libaccesstoken_sdk",
156    "bounds_checking_function:libsec_shared",
157    "bundle_framework:appexecfwk_base",
158    "bundle_framework:appexecfwk_core",
159    "c_utils:utils",
160    "faultloggerd:crash_exception",
161    "ffrt:libffrt",
162    "hilog:libhilog",
163    "hisysevent:libhisysevent",
164    "init:libbegetutil",
165    "ipc:ipc_single",
166    "jsoncpp:jsoncpp",
167    "safwk:system_ability_fwk",
168    "samgr:samgr_proxy",
169  ]
170}
171
172ohos_source_set("faultlogger_service_fuzz_src") {
173  part_name = "hiview"
174  include_dirs = [
175    ".",
176    "$hiview_plugin/faultlogger/common",
177    "$hiview_plugin/faultlogger/service/sanitizer_collector",
178    "$hiview_framework/native/unified_collection/process/include",
179  ]
180  defines = [ "UNIT_TEST" ]
181  defines += [ "UNITTEST" ]
182
183  sources = [
184    "dfx_bundle_util.cpp",
185    "faultlog_database.cpp",
186    "faultlog_formatter.cpp",
187    "faultlog_manager.cpp",
188    "faultlogger.cpp",
189    "freeze_json_generator.cpp",
190  ]
191
192  deps = [
193    ":faultlogger_service_ability",
194    "$hiview_base:hiviewbase",
195    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
196    "$hiview_plugin/faultlogger/common:faultlogger_common",
197    "$hiview_plugin/faultlogger/common:log_analyzer",
198  ]
199
200  external_deps = [
201    "access_token:libaccesstoken_sdk",
202    "bounds_checking_function:libsec_shared",
203    "bundle_framework:appexecfwk_base",
204    "bundle_framework:appexecfwk_core",
205    "c_utils:utils",
206    "faultloggerd:crash_exception",
207    "ffrt:libffrt",
208    "hilog:libhilog",
209    "hisysevent:libhisysevent",
210    "init:libbegetutil",
211    "ipc:ipc_single",
212    "jsoncpp:jsoncpp",
213    "zlib:libz",
214  ]
215}
216