diff --git a/frameworks/libhilog/BUILD.gn b/frameworks/libhilog/BUILD.gn index b4e3821db91f73402cb746fae1b1f4029430f73e..d1ca37ccd1362e7664ece14c37b839de3ff52ab4 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 9023a14afcc98a0a08f4ba139cb575605efbf5a9..6acc3af25f77d05e4b64b43da01103993b92f330 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 = "//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,28 @@ 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" ] + 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"