• 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.
13
14import("//base/hiviewdfx/faultloggerd/faultloggerd.gni")
15
16if (defined(ohos_lite)) {
17  shared_library("dfx_signalhandler") {
18    defines = [
19      "is_ohos=${is_ohos}",
20      "is_ohos_lite",
21    ]
22    visibility = [ "*:*" ]
23    include_dirs = [
24      "include",
25      "$c_utils_include_path",
26      "$faultloggerd_interfaces_path/common",
27      "$faultloggerd_path/common/cutil",
28      "$faultloggerd_path/common/dfxlog",
29    ]
30    sources = [
31      "dfx_dumprequest.c",
32      "dfx_signal_handler.c",
33      "dfx_signalhandler_exception.c",
34    ]
35
36    deps = [ "$faultloggerd_path/common/cutil:dfx_cutil" ]
37
38    external_deps = [ "bounds_checking_function:libsec_shared" ]
39
40    cflags = [
41      "-fPIC",
42      "-fno-builtin",
43      "-DDFX_NO_PRINT_LOG",
44    ]
45  }
46} else {
47  config("dfx_signal_handler_config") {
48    visibility = [ "*:*" ]
49    include_dirs = [
50      "include",
51      "$faultloggerd_interfaces_path/common",
52    ]
53  }
54
55  ohos_shared_library("dfx_signalhandler") {
56    branch_protector_ret = "pac_ret"
57    public_configs = [
58      ":dfx_signal_handler_config",
59      "$faultloggerd_common_path/build:coverage_flags",
60    ]
61    include_dirs = [
62      "include",
63      "$faultloggerd_common_path/cutil",
64      "$faultloggerd_common_path/dfxlog",
65      "$faultloggerd_interfaces_path/common",
66    ]
67    defines = [ "DFX_LOG_HILOG_BASE" ]
68    version_script = "libdfx_signalhandler.map"
69    sources = [
70      "dfx_dumprequest.c",
71      "dfx_signal_handler.c",
72      "dfx_signalhandler_exception.c",
73    ]
74
75    deps = [
76      "$faultloggerd_common_path/cutil:dfx_cutil",
77      "$faultloggerd_common_path/dfxlog:dfx_hilog_base",
78    ]
79
80    external_deps = [
81      "c_utils:utils",
82      "hilog:libhilog_base",
83    ]
84
85    innerapi_tags = [
86      "chipsetsdk_sp_indirect",
87      "platformsdk_indirect",
88    ]
89    install_enable = true
90    install_images = [
91      "system",
92      "updater",
93    ]
94
95    part_name = "faultloggerd"
96    subsystem_name = "hiviewdfx"
97  }
98}
99