From 1b2a99ebde9b6d9646306e25df4c972bdac44f15 Mon Sep 17 00:00:00 2001 From: liuyifei Date: Mon, 1 Jul 2024 01:48:39 +0000 Subject: [PATCH] =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BC=96=E8=AF=91=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20modify=20libhilog=5Fbase=20gn=20for=20c=5Futils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyifei --- frameworks/libhilog/BUILD.gn | 28 ---------------------------- interfaces/native/innerkits/BUILD.gn | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/frameworks/libhilog/BUILD.gn b/frameworks/libhilog/BUILD.gn index b4e3821..d1ca37c 100644 --- a/frameworks/libhilog/BUILD.gn +++ b/frameworks/libhilog/BUILD.gn @@ -16,7 +16,6 @@ import("//build/ohos.gni") framework_root = "//base/hiviewdfx/hilog/frameworks" libhilog_root = "$framework_root/libhilog" -libhilog_base_root = "$libhilog_root/base" ioctl_root = "$libhilog_root/ioctl" param_root = "$libhilog_root/param" socket_root = "$libhilog_root/socket" @@ -120,30 +119,3 @@ foreach(item, platforms) { platform = item } } - -config("libhilog_base_config") { - visibility = [ "*:*" ] - include_dirs = [ "include" ] -} - -ohos_source_set("libhilog_base_source") { - include_dirs = [ - "$vsnprintf_root/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - ] - - vsnprintf_sources = [ "$vsnprintf_root/vsnprintf_s_p.c" ] - - sources = [ "$libhilog_base_root/hilog_base.c" ] - sources += vsnprintf_sources - - defines = [ - "__RECV_MSG_WITH_UCRED_", - "HILOG_PROHIBIT_ALLOCATION", - ] - public_configs = [ ":libhilog_base_config" ] - configs = [ ":libhilog_base_config" ] - - part_name = "hilog" - subsystem_name = "hiviewdfx" -} diff --git a/interfaces/native/innerkits/BUILD.gn b/interfaces/native/innerkits/BUILD.gn index 9023a14..d1ff14d 100644 --- a/interfaces/native/innerkits/BUILD.gn +++ b/interfaces/native/innerkits/BUILD.gn @@ -14,6 +14,11 @@ import("//base/hiviewdfx/hilog/hilog.gni") import("//build/ohos.gni") +framework_root = "//vendor/huawei/base/hiviewdfx/hilog/frameworks" +libhilog_root = "$framework_root/libhilog" +libhilog_base_root = "$libhilog_root/base" +vsnprintf_root = "$libhilog_root/vsnprintf" + config("libhilog_pub_config") { visibility = [ ":*" ] include_dirs = [ "include" ] @@ -118,10 +123,29 @@ config("libhilog_base_pub_cfg") { ] } +config("libhilog_base_config") { + visibility = [ "*:*" ] + include_dirs = [ "../../../frameworks/libhilog/include" ] +} + ohos_static_library("libhilog_base") { public_configs = [ ":libhilog_base_pub_cfg" ] - deps = [ "../../../frameworks/libhilog:libhilog_base_source" ] + branch_protector_ret = "pac_ret" + include_dirs = [ + "$vsnprintf_root/include", + "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", + ] + + vsnprintf_sources = [ "$vsnprintf_root/vsnprintf_s_p.c" ] + + sources = [ "$libhilog_base_root/hilog_base.c" ] + sources += vsnprintf_sources + defines = [ + "__RECV_MSG_WITH_UCRED_", + "HILOG_PROHIBIT_ALLOCATION", + ] + configs = [ ":libhilog_base_config" ] subsystem_name = "hiviewdfx" part_name = "hilog" -- Gitee