• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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("lib_dfx_dump_catcher") {
18    visibility = [ "*:*" ]
19
20    include_dirs = [
21      "include",
22      "//commonlibrary/c_utils/base/include",
23      "$faultloggerd_path/common",
24      "$faultloggerd_path/common/dfxlog",
25      "$faultloggerd_path/common/util",
26      "//third_party/libunwind/include",
27      "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/include",
28      "$faultloggerd_path/tools/process_dump",
29      "$hilog_lite_include_path",
30    ]
31
32    defines = [
33      "HAVE_CONFIG_H",
34      "HAVE_ELF_H",
35      "HAVE_LINK_H",
36    ]
37
38    sources = [
39      "$faultloggerd_path/tools/process_dump/dfx_dump_request.cpp",
40      "$faultloggerd_path/tools/process_dump/dfx_dump_res.cpp",
41      "$faultloggerd_path/tools/process_dump/dfx_elf.cpp",
42      "$faultloggerd_path/tools/process_dump/dfx_frame.cpp",
43      "$faultloggerd_path/tools/process_dump/dfx_logger.cpp",
44      "$faultloggerd_path/tools/process_dump/dfx_maps.cpp",
45      "$faultloggerd_path/tools/process_dump/dfx_symbols_cache.cpp",
46      "$faultloggerd_path/tools/process_dump/dfx_unwind_local.cpp",
47      "$faultloggerd_path/tools/process_dump/dfx_util.cpp",
48      "$faultloggerd_path/utils/directory_ex.cpp",
49      "$faultloggerd_path/utils/file_ex.cpp",
50      "dfx_dump_catcher.cpp",
51    ]
52
53    deps = [
54      "$faultloggerd_path/common/dfxlog:static_common_log",
55      "$faultloggerd_path/common/util:dfx_cutil",
56      "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd",
57      "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
58      "//third_party/libunwind:libunwind",
59    ]
60  }
61} else {
62  config("dfx_dump_catcher_config") {
63    visibility = [ "*:*" ]
64
65    include_dirs = [
66      "include",
67      "//commonlibrary/c_utils/base/include",
68      "$faultloggerd_path/common",
69      "$faultloggerd_path/common/dfxlog",
70      "//third_party/libunwind/include",
71      "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/include",
72      "$faultloggerd_path/tools/process_dump",
73    ]
74  }
75
76  ohos_shared_library("lib_dfx_dump_catcher") {
77    public_configs = [ ":dfx_dump_catcher_config" ]
78
79    sources = [
80      "$faultloggerd_path/tools/process_dump/dfx_dump_request.cpp",
81      "$faultloggerd_path/tools/process_dump/dfx_dump_res.cpp",
82      "$faultloggerd_path/tools/process_dump/dfx_elf.cpp",
83      "$faultloggerd_path/tools/process_dump/dfx_frame.cpp",
84      "$faultloggerd_path/tools/process_dump/dfx_logger.cpp",
85      "$faultloggerd_path/tools/process_dump/dfx_maps.cpp",
86      "$faultloggerd_path/tools/process_dump/dfx_symbols_cache.cpp",
87      "$faultloggerd_path/tools/process_dump/dfx_unwind_local.cpp",
88      "$faultloggerd_path/tools/process_dump/dfx_util.cpp",
89      "dfx_dump_catcher.cpp",
90    ]
91
92    deps = [
93      "$faultloggerd_path/common/dfxlog:static_common_log",
94      "$faultloggerd_path/common/util:dfx_cutil",
95      "$faultloggerd_path/interfaces/innerkits/faultloggerd_client:libfaultloggerd",
96      "//third_party/libunwind:libunwind",
97    ]
98
99    external_deps = [
100      "c_utils:utils",
101      "hilog_native:libhilog",
102    ]
103    install_images = [
104      "system",
105      "updater",
106    ]
107    part_name = "faultloggerd"
108    subsystem_name = "hiviewdfx"
109  }
110}
111