diff --git a/interfaces/native/innerkits/BUILD.gn b/interfaces/native/innerkits/BUILD.gn index 443ace934238c427fff4a87ff554258325ebca4b..8152446aef538f1a37f0f3e4e7e10506cc866cee 100644 --- a/interfaces/native/innerkits/BUILD.gn +++ b/interfaces/native/innerkits/BUILD.gn @@ -13,12 +13,78 @@ import("//base/hiviewdfx/hilog/hilog.gni") import("//build/ohos.gni") +import("//foundation/arkui/ace_engine/adapter/preview/build/config.gni") config("libhilog_pub_config") { visibility = [ ":*" ] include_dirs = [ "include" ] } +if (use_mingw_win) { + ohos_shared_library("libhilog") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } + public_configs = [ ":libhilog_pub_config" ] + deps = [ + "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_source_windows", + ] + + install_enable = !hilog_native_feature_ohcore + install_images = [ + "system", + "updater", + ] + + part_name = "hilog_native" + subsystem_name = "hiviewdfx" + } +} else if (use_mac) { + ohos_shared_library("libhilog") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } + public_configs = [ ":libhilog_pub_config" ] + deps = [ + "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_source_mac", + ] + + install_enable = !hilog_native_feature_ohcore + install_images = [ + "system", + "updater", + ] + + part_name = "hilog_native" + subsystem_name = "hiviewdfx" + } +} else if (use_linux) { + ohos_shared_library("libhilog") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } + public_configs = [ ":libhilog_pub_config" ] + deps = [ + "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_source_linux", + ] + + install_enable = !hilog_native_feature_ohcore + install_images = [ + "system", + "updater", + ] + + part_name = "hilog_native" + subsystem_name = "hiviewdfx" + } +} + template("libhilog") { forward_variables_from(invoker, "*") if (current_os == "android") {