1# Copyright (c) 2021-2023 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
16ohos_shared_library("libfaultlogger") {
17  branch_protector_ret = "pac_ret"
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    cfi_vcall_icall_only = true
22    debug = false
23  }
24  configs = [ "service/idl:faultlogger_service_impl_config" ]
25  public_configs = [ "interfaces/cpp/innerkits:faultlogger_innerkits_config" ]
26  deps = [ "interfaces/cpp/innerkits:faultlogger_client_impl_with_cfi" ]
27  external_deps = [ "hilog:libhilog" ]
28
29  innerapi_tags = [
30    "chipsetsdk_indirect",
31    "platformsdk_indirect",
32  ]
33  version_script = "interfaces/cpp/innerkits/libfaultlogger.map"
34  part_name = "hiview"
35  subsystem_name = "hiviewdfx"
36}
37
38ohos_source_set("faultlogger") {
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    cfi_vcall_icall_only = true
43    debug = false
44  }
45
46  part_name = "hiview"
47  deps = [
48    "config:faultloggerPipeline",
49    "service:faultlogger_service_with_cfi",
50  ]
51
52  external_deps = [ "hilog:libhilog" ]
53}
54
55group("fuzztest") {
56  testonly = true
57  deps = [
58    "test/common/fuzztest/faultloggerclient_fuzzer:fuzztest",
59    "test/common/fuzztest/faultloggerservice_fuzzer:fuzztest",
60  ]
61}
62
63group("unittest") {
64  testonly = true
65  deps = [
66    "interfaces/js/test/unittest:unittest",
67    "test:AsanUnittest",
68    "test:FaultloggerClientUnittest",
69    "test:FaultloggerUnittest",
70    "test:FreezeJsonGeneratorUnittest",
71  ]
72}
73
74group("moduletest") {
75  testonly = true
76  deps = [ "interfaces/cpp/innerkits/test:FaultloggerNativeInterfaceTest" ]
77}
78