1# Copyright (c) 2023-2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("../config/common.gni") 16 17config("edm_commom_public_configs") { 18 include_dirs = [ 19 "include", 20 "include/plugin_utils", 21 ] 22} 23 24ohos_shared_library("edm_commom") { 25 sources = [ 26 "./src/bundle_manager_utils.cpp", 27 "./src/edm_data_ability_utils.cpp", 28 "./src/edm_permission.cpp", 29 "./src/edm_sys_manager.cpp", 30 "./src/edm_utils.cpp", 31 "./src/plugin_utils/domain_filter_rule.cpp", 32 "./src/plugin_utils/firewall_rule.cpp", 33 "./src/plugin_utils/iptables_utils.cpp", 34 "./src/plugin_utils/message_parcel_utils.cpp", 35 "./src/security_report.cpp", 36 "./src/usb_device_id.cpp", 37 ] 38 39 configs = [ 40 ":edm_commom_public_configs", 41 "../../common/config:coverage_flags", 42 ] 43 44 public_configs = [ ":edm_commom_public_configs" ] 45 46 external_deps = [ 47 "ability_base:zuri", 48 "bounds_checking_function:libsec_shared", 49 "bundle_framework:appexecfwk_core", 50 "cJSON:cjson", 51 "c_utils:utils", 52 "data_share:datashare_consumer", 53 "hilog:libhilog", 54 "ipc:ipc_core", 55 "samgr:samgr_proxy", 56 ] 57 58 defines = [] 59 if (os_account_edm_enable) { 60 external_deps += [ "os_account:os_account_innerkits" ] 61 defines += [ "OS_ACCOUNT_EDM_ENABLE" ] 62 } 63 64 if (wifi_edm_enable) { 65 external_deps += [ "wifi:wifi_sdk" ] 66 defines += [ "WIFI_EDM_ENABLE" ] 67 } 68 if (!defined(global_parts_info) || 69 defined(global_parts_info.security_security_guard)) { 70 external_deps += [ "security_guard:libsg_collect_sdk" ] 71 cflags_cc = [ "-DSECURITY_GUARDE_ENABLE" ] 72 } 73 74 sanitize = { 75 boundary_sanitize = true 76 cfi = true 77 cfi_cross_dso = true 78 debug = false 79 integer_overflow = true 80 ubsan = true 81 } 82 branch_protector_ret = "pac_ret" 83 innerapi_tags = [ "platformsdk" ] 84 subsystem_name = "customization" 85 part_name = "enterprise_device_management" 86} 87