• 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("libfaultloggerd") {
18    visibility = [ "*:*" ]
19
20    include_dirs = [
21      ".",
22      "include",
23      "$c_utils_include_path",
24      "$faultloggerd_common_path/cutil",
25      "$faultloggerd_common_path/dfxlog",
26      "$faultloggerd_common_path/dfxutil",
27      "$hilog_lite_include_path",
28    ]
29
30    sources = [
31      "faultloggerd_client.cpp",
32      "faultloggerd_socket.cpp",
33    ]
34    cflags = [ "-fstack-protector-strong" ]
35    sources += [ "$c_utils_src_path/directory_ex.cpp" ]
36
37    deps = [
38      "$faultloggerd_path/common/cutil:dfx_cutil",
39      "$faultloggerd_path/common/dfxlog:dfx_hilog",
40      "$faultloggerd_path/common/dfxutil:dfx_util",
41    ]
42
43    external_deps = [
44      "hilog_lite:hilog_shared",
45      "init:libbegetutil",
46    ]
47
48    defines = [ "is_ohos_lite" ]
49    if (!faultloggerd_hisysevent_enable) {
50      defines += [ "HISYSEVENT_DISABLE" ]
51    }
52  }
53} else {
54  config("faultloggerd_client_config") {
55    visibility = [ "*:*" ]
56
57    include_dirs = [
58      "include",
59      "$faultloggerd_interfaces_path/common",
60    ]
61  }
62
63  ohos_shared_library("libfaultloggerd") {
64    branch_protector_ret = "pac_ret"
65    public_configs = [
66      ":faultloggerd_client_config",
67      "$faultloggerd_path/common/build:coverage_flags",
68    ]
69
70    sources = [
71      "faultloggerd_client.cpp",
72      "faultloggerd_socket.cpp",
73    ]
74    cflags = [ "-fstack-protector-strong" ]
75    include_dirs = [ "$faultloggerd_common_path/dfxutil" ]
76    version_script = "libfaultloggerd.map"
77    deps = [
78      "$faultloggerd_common_path/cutil:dfx_cutil",
79      "$faultloggerd_common_path/dfxlog:dfx_hilog",
80      "$faultloggerd_common_path/dfxutil:dfx_util",
81    ]
82    external_deps = [
83      "c_utils:utils",
84      "hilog:libhilog",
85      "init:libbegetutil",
86    ]
87    install_images = [
88      "system",
89      "updater",
90    ]
91    innerapi_tags = [
92      "chipsetsdk_indirect",
93      "platformsdk_indirect",
94    ]
95    part_name = "faultloggerd"
96    subsystem_name = "hiviewdfx"
97  }
98}
99