From 091140f9e99b4eeac4f360a10f11b119cdf03ee4 Mon Sep 17 00:00:00 2001 From: i-wangliangliang Date: Mon, 5 Sep 2022 20:27:02 +0800 Subject: [PATCH] =?UTF-8?q?samgr=E5=A2=9E=E5=8A=A0=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AE=9E=E7=8E=B0feature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: i-wangliangliang Change-Id: I95fb789902ca8c50b6dc3f1795f30e646869f6d5 --- config.gni | 3 +++ samgr/BUILD.gn | 26 ++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/config.gni b/config.gni index 66c0e21..37a3563 100644 --- a/config.gni +++ b/config.gni @@ -18,4 +18,7 @@ declare_args() { # enable samgr_lite adapt to rpc on mini system. enable_ohos_systemabilitymgr_samgr_lite_rpc_mini = false + + # enable samgr_lite customize implementation + enable_ohos_systemabilitymgr_samgr_lite_customize_implementation = false } diff --git a/samgr/BUILD.gn b/samgr/BUILD.gn index 3e22d90..d1665a1 100644 --- a/samgr/BUILD.gn +++ b/samgr/BUILD.gn @@ -29,13 +29,13 @@ config("samgr_public") { "adapter", "registry", "//commonlibrary/utils_lite/include", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", - "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", + "../interfaces/kits/registry", + "../interfaces/kits/samgr", ] } if (ohos_kernel_type == "liteos_m") { - static_library("samgr") { + static_library("samgr_static") { sources = [ "registry/service_registry.c", "source/samgr_lite.c", @@ -47,32 +47,34 @@ if (ohos_kernel_type == "liteos_m") { [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite" ] public_deps = [ - "//foundation/systemabilitymgr/samgr_lite/samgr/adapter:samgr_adapter", - "//foundation/systemabilitymgr/samgr_lite/samgr/source:samgr_source", + "adapter:samgr_adapter", + "source:samgr_source", ] if (enable_ohos_systemabilitymgr_samgr_lite_rpc_mini) { defines += [ "MINI_SAMGR_LITE_RPC" ] include_dirs += - [ "//foundation/systemabilitymgr/samgr_lite/samgr_endpoint/source" ] + [ "../samgr_endpoint/source" ] public_deps += [ "//foundation/communication/ipc/interfaces/innerkits/c/dbinder:dbinder", ] } } + + group("samgr") { + if (enable_ohos_systemabilitymgr_samgr_lite_customize_implementation) { + public_configs = [ ":samgr_public" ] + } else { + public_deps = [ ":samgr_static" ] + } + } } if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { shared_library("samgr") { sources = [ "source/samgr_lite.c" ] - cflags = [ - "-fPIC", - "-Wall", - ] - public_configs = [ ":samgr_public" ] - include_dirs = [ "//third_party/bounds_checking_function/include", "//third_party/cJSON", -- Gitee