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