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_sys_manager.cpp", 29 "./src/edm_utils.cpp", 30 "./src/plugin_utils/domain_filter_rule.cpp", 31 "./src/plugin_utils/firewall_rule.cpp", 32 "./src/plugin_utils/iptables_utils.cpp", 33 "./src/plugin_utils/message_parcel_utils.cpp", 34 "./src/security_report.cpp", 35 "./src/usb_device_id.cpp", 36 ] 37 38 configs = [ 39 ":edm_commom_public_configs", 40 "../../common/config:coverage_flags", 41 ] 42 43 public_configs = [ ":edm_commom_public_configs" ] 44 45 external_deps = [ 46 "ability_base:zuri", 47 "bounds_checking_function:libsec_shared", 48 "bundle_framework:appexecfwk_core", 49 "cJSON:cjson", 50 "c_utils:utils", 51 "data_share:datashare_consumer", 52 "hilog:libhilog", 53 "ipc:ipc_core", 54 "samgr:samgr_proxy", 55 ] 56 57 defines = [] 58 if (os_account_edm_enable) { 59 external_deps += [ "os_account:os_account_innerkits" ] 60 defines += [ "OS_ACCOUNT_EDM_ENABLE" ] 61 } 62 63 if (wifi_edm_enable) { 64 external_deps += [ "wifi:wifi_sdk" ] 65 defines += [ "WIFI_EDM_ENABLE" ] 66 } 67 if (!defined(global_parts_info) || 68 defined(global_parts_info.security_security_guard)) { 69 external_deps += [ "security_guard:libsg_collect_sdk" ] 70 cflags_cc = [ "-DSECURITY_GUARDE_ENABLE" ] 71 } 72 73 sanitize = { 74 boundary_sanitize = true 75 cfi = true 76 cfi_cross_dso = true 77 debug = false 78 integer_overflow = true 79 ubsan = true 80 } 81 branch_protector_ret = "pac_ret" 82 innerapi_tags = [ "platformsdk" ] 83 subsystem_name = "customization" 84 part_name = "enterprise_device_management" 85} 86