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