diff --git a/common/dslm.gni b/common/dslm.gni old mode 100644 new mode 100755 index 242a5d6d8da853bd05cc63c5dcae8b6e1b7f89e5..a1736be3c16b4b1334ab76a114ee5c18eb1fbd59 --- a/common/dslm.gni +++ b/common/dslm.gni @@ -19,3 +19,7 @@ declare_args() { dslm_samgr_path = "//foundation/systemabilitymgr" dslm_lite_component_path = "//build/lite/config/component" } + +declare_args() { + device_security_level_feature_plugin_path = "" +} \ No newline at end of file diff --git a/oem_property/common/BUILD.gn b/oem_property/common/BUILD.gn old mode 100644 new mode 100755 index 184f1b069c8eecf5779c2b356ec6718c3c35279e..c02d6f7d3ee8128606f0caf870b820d5acf43884 --- a/oem_property/common/BUILD.gn +++ b/oem_property/common/BUILD.gn @@ -14,8 +14,9 @@ import("//base/security/device_security_level/common/dslm.gni") import("//build/ohos.gni") -# oem_common_obj object -ohos_source_set("oem_common_obj") { +if (device_security_level_feature_plugin_path == "") { + # oem_common_obj object + ohos_source_set("oem_common_obj") { sources = [ "dslm_credential.c", "dslm_credential_utils.c", @@ -60,4 +61,5 @@ ohos_source_set("oem_common_obj") { part_name = "device_security_level" subsystem_name = "security" + } } diff --git a/oem_property/ohos/standard/BUILD.gn b/oem_property/ohos/standard/BUILD.gn old mode 100644 new mode 100755 index d5e4acf8b505141dae08ebb7c764539c78b0d548..99df984913f39b7c5178b751ce06e078e34fe1d5 --- a/oem_property/ohos/standard/BUILD.gn +++ b/oem_property/ohos/standard/BUILD.gn @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//base/security/device_security_level/common/dslm.gni") import("//build/ohos.gni") # sa lib @@ -43,10 +44,19 @@ ohos_source_set("dslm_ohos_cred_obj") { "../../../services/include", ] - deps = [ - "../../../baselib/utils:utils_static", - "../../common:oem_common_obj", - ] + deps = [ "../../../baselib/utils:utils_static" ] + + if (device_security_level_feature_plugin_path != "") { + sources += [ "../../common/dslm_credential.c" ] + + include_dirs += [ + "../../common/include", + "../../interfaces/inner_api/include", + "../include", + ] + } else { + deps += [ "../../common:oem_common_obj" ] + } configs = [ "../../../common:common_configs" ] diff --git a/services/sa/BUILD.gn b/services/sa/BUILD.gn old mode 100644 new mode 100755 index 905226664539c731a37c7e04fd76defabb6b7118..19c2afc4e0a1e543e6179ca2d366b2d77b2250f6 --- a/services/sa/BUILD.gn +++ b/services/sa/BUILD.gn @@ -142,9 +142,6 @@ if (defined(ohos_lite)) { config("dslm_service_config") { include_dirs = [ "../../oem_property/include" ] } - declare_args() { - device_security_level_feature_plugin_path = "" - } ohos_shared_library("dslm_service") { shlib_type = "sa" version_script = "dslm.versionscript"