• 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")
15
16config("faultlogger_service_ohos_private_config") {
17  include_dirs = [ "." ]
18}
19
20config("faultlogger_service_impl_config") {
21  include_dirs = [ "include" ]
22}
23
24ohos_source_set("faultlogger_service_ohos_common") {
25  part_name = "hiview"
26  subsystem_name = "hiviewdfx"
27  sources = [
28    "src/faultlog_info_ohos.cpp",
29    "src/faultlog_query_result_proxy.cpp",
30    "src/faultlog_query_result_stub.cpp",
31    "src/faultlogger_service_proxy.cpp",
32    "src/faultlogger_service_stub.cpp",
33  ]
34
35  configs = [ ":faultlogger_service_ohos_private_config" ]
36
37  public_configs = [ ":faultlogger_service_impl_config" ]
38
39  deps = [
40    "$hiview_base:hiviewbase",
41    "$hiview_plugin/faultlogger/common:faultlogger_common",
42  ]
43
44  external_deps = [
45    "c_utils:utils",
46    "hilog:libhilog",
47    "ipc:ipc_single",
48  ]
49}
50
51ohos_source_set("faultlogger_service_ohos_common_with_cfi") {
52  branch_protector_ret = "pac_ret"
53  sanitize = {
54    cfi = true
55    cfi_cross_dso = true
56    cfi_vcall_icall_only = true
57    debug = false
58  }
59  part_name = "hiview"
60  subsystem_name = "hiviewdfx"
61  sources = [
62    "src/faultlog_info_ohos.cpp",
63    "src/faultlog_query_result_proxy.cpp",
64    "src/faultlog_query_result_stub.cpp",
65    "src/faultlogger_service_proxy.cpp",
66    "src/faultlogger_service_stub.cpp",
67  ]
68
69  configs = [ ":faultlogger_service_ohos_private_config" ]
70
71  public_configs = [ ":faultlogger_service_impl_config" ]
72
73  deps = [
74    "$hiview_base:hiviewbase",
75    "$hiview_plugin/faultlogger/common:faultlogger_common_with_cfi",
76  ]
77
78  external_deps = [
79    "c_utils:utils",
80    "hilog:libhilog",
81    "ipc:ipc_single",
82  ]
83}
84
85ohos_source_set("faultlogger_service_impl") {
86  part_name = "hiview"
87  subsystem_name = "hiviewdfx"
88  include_dirs = [
89    "$hiview_plugin/faultlogger/service",
90    "$hiview_plugin/faultlogger/service/fault_file",
91  ]
92
93  sources = [
94    "faultlog_query_result_ohos.cpp",
95    "faultlogger_service_ohos.cpp",
96  ]
97
98  configs = [ ":faultlogger_service_ohos_private_config" ]
99
100  public_configs = [ ":faultlogger_service_impl_config" ]
101
102  deps = [
103    "$hiview_base:hiviewbase",
104    "$hiview_plugin/faultlogger/common:faultlogger_common",
105  ]
106
107  external_deps = [
108    "c_utils:utils",
109    "hilog:libhilog",
110    "ipc:ipc_single",
111    "jsoncpp:jsoncpp",
112    "safwk:system_ability_fwk",
113    "samgr:samgr_proxy",
114  ]
115}
116
117ohos_source_set("faultlogger_service_impl_with_cfi") {
118  sanitize = {
119    cfi = true
120    cfi_cross_dso = true
121    cfi_vcall_icall_only = true
122    debug = false
123  }
124  part_name = "hiview"
125  subsystem_name = "hiviewdfx"
126  include_dirs = [
127    "$hiview_plugin/faultlogger/service",
128    "$hiview_plugin/faultlogger/service/fault_file",
129  ]
130
131  sources = [
132    "faultlog_query_result_ohos.cpp",
133    "faultlogger_service_ohos.cpp",
134  ]
135
136  configs = [ ":faultlogger_service_ohos_private_config" ]
137
138  public_configs = [ ":faultlogger_service_impl_config" ]
139
140  deps = [
141    "$hiview_base:hiviewbase",
142    "$hiview_plugin/faultlogger/common:faultlogger_common_with_cfi",
143  ]
144
145  external_deps = [
146    "c_utils:utils",
147    "hilog:libhilog",
148    "ipc:ipc_single",
149    "jsoncpp:jsoncpp",
150    "safwk:system_ability_fwk",
151    "samgr:samgr_proxy",
152  ]
153}
154