• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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")
15config("faultlogger_common_config") {
16  visibility = [ "*:*" ]
17  include_dirs = [ "." ]
18}
19
20ohos_source_set("log_analyzer") {
21  include_dirs = [
22    "//base/hiviewdfx/hiview/utility/smart_parser",
23    "//base/hiviewdfx/hiview/utility/common_utils/include",
24  ]
25
26  public_configs = [ ":faultlogger_common_config" ]
27
28  sources = [ "log_analyzer.cpp" ]
29
30  deps = [
31    ":faultlogger_common",
32    "$hiview_base:hiviewbase",
33    "$hiview_root/utility/common_utils:hiview_reliability_common_utils",
34    "$hiview_root/utility/smart_parser:smart_parser",
35  ]
36
37  external_deps = [
38    "bounds_checking_function:libsec_shared",
39    "c_utils:utils",
40    "hilog:libhilog",
41  ]
42
43  part_name = "hiview"
44  subsystem_name = "hiviewdfx"
45}
46
47ohos_source_set("log_analyzer_with_cfi") {
48  sanitize = {
49    cfi = true
50    cfi_cross_dso = true
51    cfi_vcall_icall_only = true
52    debug = false
53  }
54
55  include_dirs = [
56    "//base/hiviewdfx/hiview/utility/smart_parser",
57    "//base/hiviewdfx/hiview/utility/common_utils/include",
58  ]
59
60  public_configs = [ ":faultlogger_common_config" ]
61
62  sources = [ "log_analyzer.cpp" ]
63
64  deps = [
65    ":faultlogger_common_with_cfi",
66    "$hiview_base:hiviewbase",
67    "$hiview_root/utility/common_utils:hiview_reliability_common_utils_with_cfi",
68    "$hiview_root/utility/smart_parser:smart_parser_with_cfi",
69  ]
70
71  external_deps = [
72    "bounds_checking_function:libsec_shared",
73    "c_utils:utils",
74    "hilog:libhilog",
75  ]
76
77  part_name = "hiview"
78  subsystem_name = "hiviewdfx"
79}
80
81ohos_source_set("faultlogger_common") {
82  public_configs = [ ":faultlogger_common_config" ]
83  sources = [
84    "faultlog_bundle_util.cpp",
85    "faultlog_hilog_helper.cpp",
86    "faultlog_query_result_inner.cpp",
87    "faultlog_util.cpp",
88  ]
89
90  deps = [
91    "$hiview_base:hiviewbase",
92    "$hiview_base/event_raw:hiview_event_raw_encode",
93  ]
94
95  external_deps = [
96    "bounds_checking_function:libsec_shared",
97    "bundle_framework:appexecfwk_base",
98    "bundle_framework:appexecfwk_core",
99    "c_utils:utils",
100    "hilog:libhilog",
101    "ipc:ipc_single",
102    "jsoncpp:jsoncpp",
103  ]
104
105  part_name = "hiview"
106  subsystem_name = "hiviewdfx"
107}
108
109ohos_source_set("faultlogger_common_with_cfi") {
110  branch_protector_ret = "pac_ret"
111  sanitize = {
112    cfi = true
113    cfi_cross_dso = true
114    cfi_vcall_icall_only = true
115    debug = false
116  }
117  public_configs = [ ":faultlogger_common_config" ]
118  sources = [
119    "faultlog_bundle_util.cpp",
120    "faultlog_hilog_helper.cpp",
121    "faultlog_query_result_inner.cpp",
122    "faultlog_util.cpp",
123  ]
124
125  deps = [ "$hiview_base:hiviewbase" ]
126
127  external_deps = [
128    "bounds_checking_function:libsec_shared",
129    "bundle_framework:appexecfwk_base",
130    "bundle_framework:appexecfwk_core",
131    "c_utils:utils",
132    "hilog:libhilog",
133    "ipc:ipc_single",
134    "jsoncpp:jsoncpp",
135  ]
136
137  part_name = "hiview"
138  subsystem_name = "hiviewdfx"
139}
140