1# Copyright (c) 2024 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
16dfx_local_handler_sources = [
17  "dfx_crash_local_handler.cpp",
18  "dfx_signal_local_handler.cpp",
19]
20
21if (!defined(ohos_lite)) {
22  config("dfx_local_handler_config") {
23    visibility = [ "*:*" ]
24    defines = [ "DFX_LOG_HILOG_BASE" ]
25    include_dirs = [
26      "include",
27      "$faultloggerd_interfaces_path/common",
28      "$faultloggerd_path/common/cutil",
29      "$faultloggerd_path/common/dfxlog",
30      "$faultloggerd_path/common/dfx_util",
31      "$faultloggerd_interfaces_path/innerkits/unwinder",
32      "$faultloggerd_interfaces_path/innerkits/signal_handler/include",
33    ]
34  }
35  ohos_source_set("dfx_local_handler_src") {
36    public_configs = [
37      ":dfx_local_handler_config",
38      "$faultloggerd_frameworks_path/allocator:dfx_allocator_config",
39    ]
40    sources = dfx_local_handler_sources
41    sources += [ "$faultloggerd_interfaces_path/innerkits/signal_handler/dfx_signalhandler_exception.c" ]
42    deps = [
43      "$faultloggerd_common_path/cutil:dfx_cutil",
44      "$faultloggerd_common_path/dfxutil:dfx_util",
45      "$faultloggerd_frameworks_path/allocator:dfx_allocator_src",
46      "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd",
47      "$faultloggerd_interfaces_path/innerkits/unwinder:libunwinder",
48      "$faultloggerd_path/common/dfxlog:dfx_hilog_base",
49    ]
50
51    external_deps = [
52      "c_utils:utils",
53      "hilog:libhilog_base",
54      "hisysevent:libhisysevent",
55    ]
56    part_name = "faultloggerd"
57    subsystem_name = "hiviewdfx"
58  }
59}
60