diff --git a/bundle.json b/bundle.json index ad06e23794733dce3f9ebce75b910b6c5a8c927c..d00cd508ac03b3829a4e1a9fccca5f5aed765887 100644 --- a/bundle.json +++ b/bundle.json @@ -16,7 +16,7 @@ "SystemCapability.Security.DataTransitManager" ], "features": [ - "dataclassification_datatransmitmgr" + "dataclassification_feature_enabled" ], "adapted_system_type": [ "standard" diff --git a/interfaces/innerkits/datatransmitmgr/BUILD.gn b/interfaces/innerkits/datatransmitmgr/BUILD.gn index 98cfadb05a722daa4406a375f993e7082610d25b..e380aca5bf542846ef4c35a69e580299c87e0a72 100644 --- a/interfaces/innerkits/datatransmitmgr/BUILD.gn +++ b/interfaces/innerkits/datatransmitmgr/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. +# Copyright (C) 2022-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -20,6 +20,14 @@ config("datatransmitmgr_config") { include_dirs = [ "include" ] } +declare_args() { + dataclassification_feature_enabled = true + if (defined(global_parts_info) && + !defined(global_parts_info.commonlibrary_c_utils)) { + dataclassification_feature_enabled = false + } +} + ohos_shared_library("data_transit_mgr") { subsystem_name = "security" part_name = "dataclassification" @@ -45,9 +53,10 @@ ohos_shared_library("data_transit_mgr") { stack_protector_ret = true } } - - external_deps = [ - "c_utils:utils", + if (dataclassification_feature_enabled) { + external_deps = [ "c_utils:utils" ] + } + external_deps += [ "device_security_level:dslm_sdk", "hilog:libhilog", ]