diff --git a/frameworks/libhilog/BUILD.gn b/frameworks/libhilog/BUILD.gn index b4e3821db91f73402cb746fae1b1f4029430f73e..5fda96e229e21966b445333d3bd37ae527d47ede 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" @@ -125,25 +124,3 @@ 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 9023a14afcc98a0a08f4ba139cb575605efbf5a9..e6fa065913e7d3d3488314200b75b36fc4a2b79e 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" ] @@ -121,7 +126,21 @@ config("libhilog_base_pub_cfg") { 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", + "//vendor/huawei/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", + "HILOG_RAWFORMAT", + ] subsystem_name = "hiviewdfx" part_name = "hilog"