1# Copyright (c) 2021 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("//build/ohos.gni") 15 16config("libhilog_pub_config") { 17 visibility = [ ":*" ] 18 19 include_dirs = [ "include" ] 20} 21 22ohos_shared_library("libhilog") { 23 public_configs = [ ":libhilog_pub_config" ] 24 25 deps = [ 26 "//base/hiviewdfx/hilog/adapter:libhilog_os_adapter", 27 "//base/hiviewdfx/hilog/frameworks/native:libhilog_source", 28 ] 29 30 output_extension = "so" 31 install_enable = true 32 install_images = [ 33 "system", 34 "updater", 35 ] 36 part_name = "hilog_native" 37 subsystem_name = "hiviewdfx" 38} 39 40declare_args() { 41 ohos_hilog_base_default_privacy = true 42} 43 44config("libhilog_base_cfg") { 45 visibility = [ "*:*" ] 46 include_dirs = [ "include" ] 47 48 defines = [ "HILOG_DEFAULT_PRIVACY=$ohos_hilog_base_default_privacy" ] 49 defines += [ 50 "__RECV_MSG_WITH_UCRED_", 51 "HILOG_PROHIBIT_ALLOCATION", 52 ] 53} 54 55ohos_static_library("libhilog_base") { 56 include_dirs = [ 57 "//base/hiviewdfx/hilog/frameworks/native", 58 "//base/hiviewdfx/hilog/frameworks/native/include", 59 ] 60 sources = [ 61 "//base/hiviewdfx/hilog/frameworks/native/hilog_base.cpp", 62 "//base/hiviewdfx/hilog/frameworks/native/vsnprintf_s_p.cpp", 63 ] 64 65 public_configs = [ ":libhilog_base_cfg" ] 66 configs = [ ":libhilog_base_cfg" ] 67 68 subsystem_name = "hiviewdfx" 69 part_name = "hilog_native" 70} 71