From b896a8e6ae057c84760afd693d032218132fdd3c Mon Sep 17 00:00:00 2001 From: buzhenwang Date: Thu, 29 Jun 2023 16:29:50 +0800 Subject: [PATCH] hilog add sdk target Signed-off-by: buzhenwang --- interfaces/native/innerkits/BUILD.gn | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/interfaces/native/innerkits/BUILD.gn b/interfaces/native/innerkits/BUILD.gn index 443ace9..8152446 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") { -- Gitee