• 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    "hilog:libhilog",
40  ]
41
42  part_name = "hiview"
43}
44
45ohos_source_set("log_analyzer_with_cfi") {
46  sanitize = {
47    cfi = true
48    cfi_cross_dso = true
49    cfi_vcall_icall_only = true
50    debug = false
51  }
52
53  include_dirs = [
54    "//base/hiviewdfx/hiview/utility/smart_parser",
55    "//base/hiviewdfx/hiview/utility/common_utils/include",
56  ]
57
58  public_configs = [ ":faultlogger_common_config" ]
59
60  sources = [ "log_analyzer.cpp" ]
61
62  deps = [
63    ":faultlogger_common_with_cfi",
64    "$hiview_base:hiviewbase",
65    "$hiview_root/utility/common_utils:hiview_reliability_common_utils_with_cfi",
66    "$hiview_root/utility/smart_parser:smart_parser_with_cfi",
67  ]
68
69  external_deps = [
70    "bounds_checking_function:libsec_shared",
71    "hilog:libhilog",
72  ]
73
74  part_name = "hiview"
75}
76
77ohos_source_set("faultlogger_common") {
78  public_configs = [ ":faultlogger_common_config" ]
79  sources = [
80    "faultlog_query_result_inner.cpp",
81    "faultlog_util.cpp",
82  ]
83
84  deps = [
85    "$hiview_base:hiviewbase",
86    "$hiview_base/event_raw:hiview_event_raw_encode",
87  ]
88
89  external_deps = [
90    "bounds_checking_function:libsec_shared",
91    "hilog:libhilog",
92  ]
93
94  part_name = "hiview"
95}
96
97ohos_source_set("faultlogger_common_with_cfi") {
98  branch_protector_ret = "pac_ret"
99  sanitize = {
100    cfi = true
101    cfi_cross_dso = true
102    cfi_vcall_icall_only = true
103    debug = false
104  }
105  public_configs = [ ":faultlogger_common_config" ]
106  sources = [
107    "faultlog_query_result_inner.cpp",
108    "faultlog_util.cpp",
109  ]
110
111  deps = [ "$hiview_base:hiviewbase" ]
112
113  external_deps = [
114    "bounds_checking_function:libsec_shared",
115    "hilog:libhilog",
116  ]
117
118  part_name = "hiview"
119}
120