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_interfaces_path/common", 22 "$hilog_lite_include_path", 23 ] 24 defines = [ 25 "is_ohos=${is_ohos}", 26 "is_ohos_lite", 27 ] 28 } 29 30 static_library("dfx_hilog") { 31 public_configs = [ ":dfx_log_config" ] 32 deps = [ "$hilog_lite_deps_path" ] 33 } 34} else { 35 config("dfx_log_config") { 36 visibility = [ ":*" ] 37 include_dirs = [ 38 ".", 39 "$faultloggerd_interfaces_path/common", 40 ] 41 } 42 43 ohos_static_library("dfx_hilog") { 44 public_configs = [ ":dfx_log_config" ] 45 external_deps = [ 46 "c_utils:utils", 47 "hilog:libhilog", 48 ] 49 part_name = "faultloggerd" 50 subsystem_name = "hiviewdfx" 51 } 52 53 ohos_static_library("dfx_hilog_base") { 54 public_configs = [ ":dfx_log_config" ] 55 defines = [ "DFX_LOG_HILOG_BASE" ] 56 external_deps = [ 57 "c_utils:utils", 58 "hilog:libhilog_base", 59 ] 60 part_name = "faultloggerd" 61 subsystem_name = "hiviewdfx" 62 } 63 64 # just for updater subsystem, use dfx_libhilog_base first 65 ohos_static_library("dfx_hilog_base_static") { 66 public_configs = [ ":dfx_log_config" ] 67 defines = [ "DFX_LOG_HILOG_BASE" ] 68 external_deps = [ 69 "bounds_checking_function:libsec_static", 70 "c_utils:utilsbase", 71 "hilog:libhilog_base", 72 ] 73 part_name = "faultloggerd" 74 subsystem_name = "hiviewdfx" 75 } 76} 77