• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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.
13
14import("//base/hiviewdfx/faultloggerd/faultloggerd.gni")
15
16if (defined(ohos_lite)) {
17  config("dfx_log_config") {
18    visibility = [ ":*" ]
19    include_dirs = [
20      ".",
21      "$faultloggerd_path/common",
22      "$hilog_lite_include_path",
23    ]
24  }
25  static_library("static_common_log") {
26    sources = [ "dfx_log.cpp" ]
27    public_configs = [ ":dfx_log_config" ]
28    defines = [ "DFX_LOG_USE_DMESG" ]
29
30    deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
31  }
32
33  static_library("static_hilog") {
34    sources = [ "dfx_log.cpp" ]
35    public_configs = [ ":dfx_log_config" ]
36
37    deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
38  }
39} else {
40  config("dfx_log_config") {
41    visibility = [ ":*" ]
42    include_dirs = [
43      ".",
44      "$faultloggerd_path/common",
45    ]
46  }
47
48  ohos_static_library("static_common_log") {
49    sources = [ "dfx_log.cpp" ]
50    public_configs = [ ":dfx_log_config" ]
51    external_deps = [
52      "c_utils:utils",
53      "hilog:libhilog",
54    ]
55    part_name = "faultloggerd"
56    subsystem_name = "hiviewdfx"
57  }
58
59  ohos_static_library("static_hilog") {
60    sources = [ "dfx_log.cpp" ]
61    public_configs = [ ":dfx_log_config" ]
62    external_deps = [
63      "c_utils:utils",
64      "hilog:libhilog",
65    ]
66    part_name = "faultloggerd"
67    subsystem_name = "hiviewdfx"
68  }
69
70  ohos_static_library("static_hilog_base") {
71    sources = [ "dfx_log.cpp" ]
72    public_configs = [ ":dfx_log_config" ]
73    defines = [ "DFX_LOG_USE_HILOG_BASE" ]
74    external_deps = [
75      "c_utils:utils",
76      "hilog:libhilog_base",
77    ]
78    part_name = "faultloggerd"
79    subsystem_name = "hiviewdfx"
80  }
81
82  ohos_static_library("static_hilog_base_dmesg") {
83    sources = [ "dfx_log.cpp" ]
84    public_configs = [ ":dfx_log_config" ]
85    defines = [
86      "DFX_LOG_USE_HILOG_BASE",
87      "DFX_LOG_USE_DMESG",
88    ]
89    external_deps = [
90      "c_utils:utils",
91      "hilog:libhilog_base",
92    ]
93    part_name = "faultloggerd"
94    subsystem_name = "hiviewdfx"
95  }
96}
97