• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("//build/ohos.gni")
14import("//build/ts.gni")
15config("faultloggerd_config") {
16  cflags = [
17    "-D ALWAYSTRUE",
18    "-D DFX_NO_PRINT_LOG",
19    "-D is_host",
20  ]
21  if (!is_independent_compile) {
22    configs = [ "${TS_DIR}/gn:ts_config" ]
23  }
24}
25config("faultloggerd_public_config") {
26  include_dirs = [
27    "faultloggerd/common/dfxlog",
28    "faultloggerd/common/dfxutil",
29    "faultloggerd/common/trace/include",
30    "faultloggerd/interfaces/common",
31    "faultloggerd/interfaces/nonlinux",
32    "faultloggerd/interfaces/innerkits/unwinder/include",
33    "${THIRD_PARTY}/hiperf/include",
34    "${THIRD_PARTY}/hiperf/include/nonlinux",
35    "${THIRD_PARTY}/hiperf/include/nonlinux/linux",
36    "${THIRD_PARTY}/bounds_checking_function/include",
37    "${COMMON_LIBRARY}/base/include",
38  ]
39  if (is_mingw) {
40    include_dirs += [ "${THIRD_PARTY}/libunwind/include/mingw" ]
41  }
42}
43ohos_source_set("libfaultloggerd") {
44  sources = [
45    "faultloggerd/common/dfxutil/dfx_util.cpp",
46    "faultloggerd/common/trace/dfx_trace_dlsym.cpp",
47    "faultloggerd/interfaces/innerkits/unwinder/dfx_elf.cpp",
48    "faultloggerd/interfaces/innerkits/unwinder/dfx_elf_parser.cpp",
49    "faultloggerd/interfaces/innerkits/unwinder/dfx_hap.cpp",
50    "faultloggerd/interfaces/innerkits/unwinder/dfx_map.cpp",
51    "faultloggerd/interfaces/innerkits/unwinder/dfx_maps.cpp",
52    "faultloggerd/interfaces/innerkits/unwinder/dfx_memory.cpp",
53    "faultloggerd/interfaces/innerkits/unwinder/dfx_mmap.cpp",
54    "faultloggerd/interfaces/innerkits/unwinder/dfx_symbols.cpp",
55    "faultloggerd/interfaces/innerkits/unwinder/unwinder_config.cpp",
56  ]
57  configs += [ ":faultloggerd_config" ]
58  public_configs = [ ":faultloggerd_public_config" ]
59  public_deps = [ "${THIRD_PARTY}/bounds_checking_function:libsec_static" ]
60  part_name = "faultloggerd"
61  subsystem_name = "thirdparty"
62}
63