From c57526f8cac6b86cbd51bac38a13aa20163d74c3 Mon Sep 17 00:00:00 2001 From: zhuofan0129 <861080528@qq.com> Date: Tue, 21 May 2024 22:20:27 +0800 Subject: [PATCH] feat: build independly Signed-off-by: zhuofan0129 <861080528@qq.com> --- baselib/utils/BUILD.gn | 3 +-- bundle.json | 9 +++++---- oem_property/common/BUILD.gn | 9 +++++---- services/common/BUILD.gn | 16 +++++++--------- test/dslm_unit_test/BUILD.gn | 2 +- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/baselib/utils/BUILD.gn b/baselib/utils/BUILD.gn index 3fbefa5..4630a26 100644 --- a/baselib/utils/BUILD.gn +++ b/baselib/utils/BUILD.gn @@ -76,9 +76,8 @@ ohos_static_library("utils_static") { sources += [ "src/utils_timer.cpp" ] - deps += [ "//third_party/cJSON:cjson" ] - external_deps = [ + "cJSON:cjson", "c_utils:utils", "hilog:libhilog", ] diff --git a/bundle.json b/bundle.json index cba9724..4e051e4 100644 --- a/bundle.json +++ b/bundle.json @@ -22,6 +22,8 @@ "//base/security/device_security_level/hisysevent.yaml" ], "adapted_system_type": [ + "mini", + "small", "standard" ], "rom": "200KB", @@ -39,12 +41,11 @@ "init", "ipc", "safwk", - "samgr" - ], - "third_party": [ + "samgr", "cJSON", "openssl" - ] + ], + "third_party": [] }, "build": { "group_type": { diff --git a/oem_property/common/BUILD.gn b/oem_property/common/BUILD.gn index 6aafa0e..6689302 100644 --- a/oem_property/common/BUILD.gn +++ b/oem_property/common/BUILD.gn @@ -31,8 +31,10 @@ ohos_source_set("oem_common_obj") { if (defined(ohos_lite)) { if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") { - deps += [ "//third_party/openssl/ohos_lite:openssl_shared" ] - external_deps = [ "hilog_lite:hilog_shared" ] + external_deps = [ + "hilog_lite:hilog_shared", + "openssl/ohos_lite:openssl_shared", + ] } else if (ohos_kernel_type == "liteos_m") { deps += [ "$dslm_hilog_path/featured:hilog_static" ] } @@ -47,11 +49,10 @@ ohos_source_set("oem_common_obj") { } branch_protector_ret = "pac_ret" - deps += [ "//third_party/openssl:libcrypto_shared" ] - external_deps = [ "c_utils:utils", "hilog:libhilog", + "openssl:libcrypto_shared", ] } configs = [ diff --git a/services/common/BUILD.gn b/services/common/BUILD.gn index f663130..ff6a139 100644 --- a/services/common/BUILD.gn +++ b/services/common/BUILD.gn @@ -30,16 +30,14 @@ ohos_source_set("service_common_obj") { if (defined(ohos_lite)) { if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") { - deps += [ - "$dslm_ipc_path/interfaces/innerkits/c/ipc:ipc_single", - "//third_party/openssl/ohos_lite:openssl_shared", + deps += [ "$dslm_ipc_path/interfaces/innerkits/c/ipc:ipc_single" ] + external_deps = [ + "hilog_lite:hilog_shared", + "openssl/ohos_lite:openssl_shared", ] - external_deps = [ "hilog_lite:hilog_shared" ] } else if (ohos_kernel_type == "liteos_m") { - deps += [ - "$dslm_hilog_path/featured:hilog_static", - "//third_party/openssl/ohos_lite:openssl_static", - ] + deps += [ "$dslm_hilog_path/featured:hilog_static" ] + external_deps = [ "openssl/ohos_lite:openssl_static" ] } } else { sanitize = { @@ -52,12 +50,12 @@ ohos_source_set("service_common_obj") { } branch_protector_ret = "pac_ret" - deps += [ "//third_party/openssl:libcrypto_shared" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", + "openssl:libcrypto_shared", ] } diff --git a/test/dslm_unit_test/BUILD.gn b/test/dslm_unit_test/BUILD.gn index b25fa58..4fdd916 100644 --- a/test/dslm_unit_test/BUILD.gn +++ b/test/dslm_unit_test/BUILD.gn @@ -89,7 +89,6 @@ if (os_level == "standard") { "../../services/common:service_common_obj", "../../services/dslm:service_dslm_test_obj", "../../services/msg:service_msg_obj", - "//third_party/googletest:gmock", ] external_deps = [ @@ -101,6 +100,7 @@ if (os_level == "standard") { "hisysevent:libhisysevent", "hitrace:hitrace_meter", "huks:libhukssdk", + "googletest:gmock", ] } } -- Gitee